Tip 1 : Try to solve pseudo code & simple DSA problems.
Tip 2 : Focus on DSA.
Tip 3 : Solve/practice Tree(Binary search tree) related questions.
Tip 1: Add DSA-related skills in your resume.
Tip 2: Be honest on your resume, list only what you truly know and can confidently discuss.
The test was held in morning on the college campus and consisted of coding questions, 16 multiple-choice questions based on basic maths and logic. Each correct answer awarded +1 point, while every wrong answer results in a deduction of -0.5 from the total score.



Given string s containing characters, write a program for finding the frequency of characters from the string.
Use Hash Map or Dictionary
1) Store Frequencies of all characters in a map.
2) Traverse through the string, append the character and its frequency to the result and make frequency as 0 to avoid repetition.



Given an array ‘a’ of size ‘n’-1 with elements of range 1 to ‘n’. The array does not contain any duplicates. write a program for finding the missing number.
Used an auxiliary array hash[] to store the frequency of each element in the given array arr[]. The number with frequency 0 is the missing number.



Write a program for finding the first non-repeating character from the string.
Use an array of size 26 to store the frequencies of each character. Traverse the input string twice:
First traversal is to count the frequency of each character.
Second traversal to find the first character in string with a frequency of one.
What will be the output of the following pseudocode?
Integer x, y, Z, a
Set x=2,y=1,z=5
a = (x AND y) OR (z + 1)
Print a
A. 5
B. 3
C. 2
D. 1
Here x = 2, y = 1, z = 5
a = (2 && 1) || (5 + 1)
= (1) || (6)
= 1
So it will print 1
Answer is option D
The pen-and-paper coding round was conducted on the same day as the MCQ round. It had a unique format, requiring students who cleared the MCQ round to solve coding problems subjectively, without using an IDE.



Write a program to insert a node into the Binary search tree.
To insert a node into a Binary Search Tree (BST), we can do the following steps:
Start from the Root Node of the binary search tree.
Compare the value to be inserted with the current node’s value.
If the value is smaller than the current node's value, move to the left child.
If the value is larger, move to the right child.
Continue this process recursively by repeating the comparison until you reach an empty (null) child pointer where the new node can be inserted.
Once you find an empty spot, insert the new node as a left or right child, depending on the comparison.



Write a program for finding the path of nodes whose sum equals the input number.
For finding the path of nodes whose sum is equal to a given number, we can follow the given algorithm :
Begin with the root node of the BST and initiate a DFS traversal.
At each node, subtract the node’s value from the target sum & keep track of the current path of nodes visited during the traversal.
If you reach a leaf node and the remaining sum equals 0, you've found a valid path, and you can store this path.
If the sum does not equal 0, backtrack to the left & right side of the BST to explore other possibilities.
Continue the traversal recursively until all paths have been explored.



Write a program for swapping the left & right subtree of the given binary search tree.
For swapping the left & right subtree of the given binary search tree, we can follow the given steps:
Begin with the root of the tree. If the root is null, there’s nothing to swap.
For each node, recursively swap its left and right child subtrees. This means that for each node:
The left child should become the right child & right child should become the left child.
After swapping the left and right children for the current node, do the same for the left & right subtrees.



Write a program for finding the height of the binary search tree.
To find the height of the binary search tree, we can follow the steps :
Here base cases are like : If the tree is empty (i.e., the root is null), the height of the tree is -1.
If the tree has only one node (the root node), the height is 0.
For each node, the height is the maximum of the heights of its left and right subtrees plus one (to account for the current node).
The height of a node can be calculated as:
Height of node = max (height of left subtree, height of right subtree) + 1



Write a program for calculating the sum of leaf nodes in the given binary search tree.
To find the sum of leaf nodes in the given binary search tree we can use the following algorithm :
Traverse the tree in a Depth-First Search (DFS) manner.
If the root is null then the sum will be 0.
If the node is a leaf node (both left and right children are null), add its value to the sum.
If the node is not a leaf, recursively traverse its left and right subtrees.
The interview was conducted on the college campus, and only students who cleared the DSA round were eligible to attend this interview. The main focus of this interview was on the resume, puzzles, projects and data structures & algorithms questions.



Write a program to sort an array using bubble sort algorithm.
Compare and swap the adjacent elements if they are in the wrong order starting from the first two elements.
Do that for all elements moving from left to right. We will get the largest element at the right end.
Start compare and swap again from the start but this time, skip the last element as its already at correct position.
The second last element will be moved at the right end just before the last element.
Repeat the above steps till all the elements are sorted.
The interview started with introductions, where I introduced myself first, followed by the interviewer introduced themselves.
Explained briefly about the project that I have mentioned in my resume.
Interviewer asked questions related to my project.
You’re blindfolded, and there are 10 coins in front of you—5 heads and 5 tails, but you can’t tell which is which. The challenge is to divide them into two piles with an equal number of heads in each pile.
Answer that I gave:
Separate the coins into two piles of 5 coins each, randomly.
Flip all the coins in one pile.
Now, both piles will have the same number of heads. This works because flipping the coins in one pile will reverse the number of heads and tails, ensuring an equal count of heads in both piles.
By asking this puzzle they want to test my logical thinking process
The interview was conducted online, and only students who cleared the first technical interview were eligible to attend. In this round, the interviewers were senior members of the company.
Explain in brief 4 pillars of object oriented programming. (Learn)
Explain briefly about your projects
Why do you use the MERN stack as a tech stack for your project?
What are your strengths & weaknesses?
8 balls weighing problem
You are provided with 8 identical balls and a measuring instrument. 7 of the eight balls are equal in weight and one of the eight given balls is defective and weighs less. The task is to find the defective ball in exactly two measurements.
We can solve this puzzle like :
Divide the 8 balls into 3 groups. Two groups of 3 balls each, and one group of 2 balls.
Weigh the two groups of 3 balls against each other.
If they balance, the defective ball is in the group of 2 balls.
If they don’t balance, the lighter group contains the defective ball.
For the second measurement:
If you identified the group of 2 balls, simply weigh them against each other to find the lighter one.
If you identified the group of 3 balls, weigh two of them. The lighter one is the defective ball, or if they balance, the third ball is defective.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?