Tip 1: Practice popular questions from arrays, binary trees, and linked lists from CodeStudio's Interview Problems.
Tip 2: Make sure you are aware of how to calculate the time and space complexity for every problem you're coding.
Tip 3: Prepare through mock interviews to practice explaining your approach while solving problems in an actual interview.
Tip 1: Describe the best of your projects concisely. Don't forget to include buzzwords like REST APIs, DB Indexing, Benchmarking, etc., if you worked on the backend.
Tip 2: Avoid adding school achievements like Olympiads or Class Topper in your resume.
Tip 3: If you have work experience, market yourself effectively. Use terms like 'Created/Owned the project through the entire SDLC.'


A binary search tree, also called an ordered or sorted binary tree, is a rooted binary tree whose internal nodes each store a key greater than all the keys in the node's left subtree and less than those in its right subtree.
For Example, the root node is given as follows :
‘ROOT’ = 6 4 3 -1 -1 5 -1 -1 8 7 -1 -1 9 -1 -1
Level 1 :
The root node of the tree is 6
Level 2 :
Left child of 6 = 4
Right child of 6 = 8
Level 3 :
Left child of 4 = 3
Right child of 4 = 5
Left child of 8 = 7
Right child of 8 = 9
Therefore all the leaf nodes are 3, 5, 7 and 9.



If the given array is [1,2,3] then the answer would be 2. One of the ways to make all the elements of the given array equal is by adding 1 to the array element with value 1 and subtracting 1 from the array element with value 3. So that final array would become [2,2,2].


For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
1
/ \
2 3
/ \
4 5
Output: 1 3 2 4 5
I used an approach based on using two stacks. One stack is used for printing from left to right, and the other stack is used for printing from right to left. In each iteration, nodes of one level are stored in one of the stacks. We print these nodes and push nodes of the next level into the other stack.



For sorting, I explained to the interviewer the merge sort algorithm for linked lists, which divides the linked list into two halves and then merges them. I wrote a fully commented code for him in clear handwriting. I also calculated the midpoint using the slow and fast pointer approach.



a ⊕ b = X, where ⊕ denotes bitwise xor operation.
Both numbers ‘a’ and ‘b’ belong to the array ‘A’.
I explained to him a simple brute force approach through the loop but the interviewer was expecting a more efficient solution that I couldn‘t crack up.

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