Tip 1: Practice at least 250 questions.
Tip 2: Example: Do at least two projects.
Tip 3: Practice on CodeStudio.
Tip 4: Practice past years' questions.
Tip 1: Keep a maximum of three projects in the projects section but ensure that at least one of them is hosted/live and can be shown to the interviewer.
Tip 2: Do not include false information on your resume.
In this round, the interviewer asked me four coding questions and a question based on OOPS.



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
The idea is to push all opening brackets onto the stack. Whenever you encounter a closing bracket, check if the top of the stack contains the corresponding opening bracket. If it does, pop the stack and continue the iteration. In the end, if the stack is empty, it means all brackets are balanced or well-formed. Otherwise, they are not balanced.




Draw the path that the spiral makes. We know that the path should turn clockwise whenever it would go out of bounds or into a previously visited cell.
Follow the given steps to solve the problem:



If N = 2 and prerequisite = [[1, 2]]. Then, there are a total of 2 courses you need to take. To take course 1 you need to finish course 2. So, it is possible to complete all courses.



1. A node will be in the bottom-view if it is the bottom-most node at its horizontal distance from the root.
2. The horizontal distance of the root from itself is 0. The horizontal distance of the right child of the root node is 1 and the horizontal distance of the left child of the root node is -1.
3. The horizontal distance of node 'n' from root = horizontal distance of its parent from root + 1, if node 'n' is the right child of its parent.
4. The horizontal distance of node 'n' from root = horizontal distance of its parent from the root - 1, if node 'n' is the left child of its parent.
5. If more than one node is at the same horizontal distance and is the bottom-most node for that horizontal distance, including the one which is more towards the right.
Input: Consider the given Binary Tree:

Output: 4 2 6 3 7
Explanation:
Below is the bottom view of the binary tree.

1 is the root node, so its horizontal distance = 0.
Since 2 lies to the left of 0, its horizontal distance = 0-1= -1
3 lies to the right of 0, its horizontal distance = 0+1 = 1
Similarly, horizontal distance of 4 = Horizontal distance of 2 - 1= -1-1=-2
Horizontal distance of 5 = Horizontal distance of 2 + 1= -1+1 = 0
Horizontal distance of 6 = 1-1 =0
Horizontal distance of 7 = 1+1 = 2
The bottom-most node at a horizontal distance of -2 is 4.
The bottom-most node at a horizontal distance of -1 is 2.
The bottom-most node at a horizontal distance of 0 is 5 and 6. However, 6 is more towards the right, so 6 is included.
The bottom-most node at a horizontal distance of 1 is 3.
The bottom-most node at a horizontal distance of 2 is 7.
Hence, the bottom view would be 4 2 6 3 7
This was also a technical round. The interviewer asked me one coding problem and some questions based on my resume.




1. Make in-place changes, that is, modify the nodes given a binary tree to get the required mirror tree.
The idea is to traverse recursively and swap the right and left subtrees after traversing the subtrees.
Follow the steps below to solve the problem:
Call Mirror for left-subtree i.e., Mirror(left-subtree)
Call Mirror for right-subtree i.e., Mirror(right-subtree)
Swap left and right subtrees.
temp = left-subtree
left-subtree = right-subtree
right-subtree = temp
What is the difference between DELETE, TRUNCATE, and DROP? (Learn)
Difference between CNN and ANN. How do you use CNN in your project? (Learn)



1. INSERT(key, value): Inserts an integer value to the data structure against a string type key if not already present. If already present, it updates the value of the key with the new one. This function will not return anything.
2. DELETE(key): Removes the key from the data structure if present. It doesn't return anything.
3. SEARCH(key): It searches for the key in the data structure. In case it is present, return true. Otherwise, return false.
4. GET(key): It returns the integer value stored against the given key. If the key is not present, return -1.
5. GET_SIZE(): It returns an integer value denoting the size of the data structure.
6. IS_EMPTY(): It returns a boolean value, denoting whether the data structure is empty or not.
1. Key is always a string value.
2. Value can never be -1.
First(Denoted by integer value 1): Insertion to the Data Structure. It is done in a pair of (key, value).
Second(Denoted by integer value 2): Deletion of a key from the Data Structure.
Third(Denoted by integer value 3): Search a given key in the Data Structure.
Fourth(Denoted by integer value 4): Retrieve the value for a given key from the Data Structure.
Fifth(Denoted by integer value 5): Retrieve the size of the Data Structure.
Sixth(Denoted by integer value 6): Retrieve whether the Data Structure is empty or not.
In this round, the interviewer asked me about my projects, resume-related topics, puzzles, etc.
Two pipes, A and B, can fill a cistern in 37 minutes and 45 minutes, respectively. Both pipes are opened. The cistern will be filled in just half an hour if B is turned off after.
Egg dropping Puzzle:
The following is a description of an instance of the famous egg drop puzzle involving N = 2 eggs and a K = 36-floor building.
Suppose we wish to determine which floors in a 36-story building are safe to drop eggs from and which will cause the eggs to break upon landing. We make a few assumptions:
If only one egg is available and we want to be certain of obtaining the correct result, the experiment can be conducted in only one way:
Drop the egg from the first floor; if it survives, drop it from the second floor, and continue upward until it breaks. In the worst case, this method may require 36 drops.
Now, suppose two eggs are available. What is the minimum number of egg drops required to guarantee determining the critical floor in all cases?
Difference between java and cpp.(Learn)

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