Add office photos
HashedIn by Deloitte logo
Engaged Employer

HashedIn by Deloitte

Verified
4.2
based on 414 Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Software Engineer
Fresher
Clear (2)

HashedIn by Deloitte Software Engineer Interview Questions and Answers for Freshers

Updated 5 Feb 2024

Q1. Check if Two Trees are Mirror

Given two arbitrary binary trees, your task is to determine whether these two trees are mirrors of each other.

Explanation:

Two trees are considered mirror of each other if:

  • The r...read more
Ans.

Check if two binary trees are mirrors of each other based on specific criteria.

  • Compare the roots of both trees.

  • Check if the left subtree of the first tree is the mirror of the right subtree of the second tree.

  • Verify if the right subtree of the first tree is the mirror of the left subtree of the second tree.

Add your answer
right arrow

Q2. Count Ways to Reach the N-th Stair Problem Statement

You are provided with a number of stairs, and initially, you are located at the 0th stair. You need to reach the Nth stair, and you can climb one or two step...read more

Ans.

The problem involves finding the number of distinct ways to climb N stairs by taking 1 or 2 steps at a time.

  • Use dynamic programming to solve the problem efficiently.

  • The number of ways to reach the Nth stair is the sum of the number of ways to reach the (N-1)th stair and the (N-2)th stair.

  • Handle base cases for N=0 and N=1 separately.

  • Consider using modulo operation to avoid overflow for large values of N.

Add your answer
right arrow

Q3. Tic-Tac-Toe Design Problem

Design a 2-player Tic-Tac-Toe game played on an N * N grid where Player 1 uses ‘X’ and Player 2 uses ‘O’. A move is always valid and occupies an empty spot.

If a player places N of th...read more

Ans.

Design a 2-player Tic-Tac-Toe game on an N x N grid where players place their marks to win by getting N marks in a row.

  • Create a 2D array to represent the game board.

  • Implement a function to check for a win after each move.

  • Handle player moves and update the board accordingly.

  • Return the result of each move (0, 1, or 2) based on the game state.

  • Consider horizontal, vertical, and diagonal win conditions.

Add your answer
right arrow

Q4. Increase Number By 1 Problem Statement

Given an array of integers NUM that consists of N elements, where the array represents the digits of a number, your task is to add 1 to this number. The number is positive...read more

Ans.

Given an array representing digits of a number, add 1 to the number.

  • Iterate through the array from right to left, starting with the least significant digit.

  • Add 1 to the current digit and check if it becomes 10. If so, set it to 0 and carry over to the next digit.

  • Handle the case where the most significant digit needs to be incremented by creating a new array with an extra digit.

Add your answer
right arrow
Discover HashedIn by Deloitte interview dos and don'ts from real experiences

Q5. Ways To Make Coin Change

Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make the c...read more

Ans.

The task is to determine the total number of ways to make change for a specified value using given denominations.

  • Create a dynamic programming table to store the number of ways to make change for each value up to the target value.

  • Iterate through each denomination and update the table accordingly based on the current denomination.

  • The final value in the table will represent the total number of ways to make change for the target value.

  • Consider edge cases such as when the target v...read more

Add your answer
right arrow

Q6. Excel Column Number Conversion

Given a column title as it appears in an Excel sheet, your task is to return its corresponding column number.

Example:

Input:
S = "AB"
Output:
28
Explanation:

The sequence is as f...read more

Ans.

Convert Excel column title to corresponding column number.

  • Iterate through each character in the input string

  • Calculate the corresponding value of each character based on its position in the alphabet

  • Multiply the value by 26 raised to the power of its position from the right in the input string

  • Sum up all the values to get the final column number

Add your answer
right arrow

Q7. Q1 - Pre order traversal without recursion. Q2 - Reverse a linked list.

Ans.

Q1 - Pre order traversal without recursion. Q2 - Reverse a linked list.

  • Q1: Use a stack to keep track of nodes. Start with root, push it to stack. Pop top node, print it, push right and left children to stack.

  • Q2: Traverse the linked list and change the direction of the pointers. Set the head of the reversed list as the last node of the original list.

Add your answer
right arrow

Q8. Q1 - Sort the string according to frequency of characters

Ans.

Sort a string based on the frequency of its characters.

  • Create a hash table to store the frequency of each character.

  • Sort the characters based on their frequency using a sorting algorithm.

  • Reconstruct the string based on the sorted characters and their frequency.

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

Capgemini Logo
3.7
 • 154 Interview Questions
UKG Logo
3.1
 • 10 Interview Questions
View all
Recently Viewed
INTERVIEWS
Tvs Brakes India Pvt Ltd Sholinghur
No Interviews
INTERVIEWS
Tvs Brakes India Pvt Ltd Sholinghur
No Interviews
INTERVIEWS
HashedIn by Deloitte
10 top interview questions
INTERVIEWS
Tvs Brakes India Pvt Ltd Sholinghur
No Interviews
INTERVIEWS
Tvs Brakes India Pvt Ltd Sholinghur
No Interviews
INTERVIEWS
Netcracker Technology
10 top interview questions
INTERVIEWS
Mahindra Construction Equipment
No Interviews
SALARIES
Tvs Brakes India Pvt Ltd Sholinghur
SALARIES
Tvs Brakes India Pvt Ltd Sholinghur
INTERVIEWS
L&T Technology Services
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter