Tip 1 : Work hard and prepare well.
Tip 2 : Prepare resume well.
Tip 1: Have good projects on your resume; the definition of "good" is not tough. It simply means what you create. You should be able to explain it.
Tip 2: Try to work on a project that solves a real-life problem. It can be anything (for example, a contest reminder, as I frequently miss my contests and decided to do a project on it).
Tip 3: Never put things you don’t know on your resume. It’s not about quantity; it’s about quality.
- Morning time.
- Environment was good.
- Interviewer was good.



For the given binary tree

The level order traversal will be {1,2,3,4,5,6,7}.
Again, I had already done this question in the course itself, so it was a cakewalk for me.
Solution:
Step 1: Create an empty queue that accepts BinaryTreeNode.
Step 2: Put the root of the binary tree in the queue.
Step 3: Loop while the queue is not empty:
3a. Store the current size of the queue, which will help us know how many nodes are there that need to be printed at one level.
3b. Dequeue the first node from the queue.
3c. Print its data.
3d. If the dequeued node has a left or right child, enqueue it to the queue.
3e. Print a line as we move to the next level.



1. The given node 'TARGET_NODE_VAL' is always present in the tree.
2. The value of each node in the tree is unique.
3. Notice that the Kth ancestor node if present will always be unique.
I solved this question recursively.
Step 1: Find the given node in the tree.
Step 2: If the node is not found, simply return null; otherwise, check if K is greater than 0. If yes, that means we haven't found the Kth ancestor yet, so we decrement the value of K.
Also, check if the K value is 0. If so, we have found the Kth ancestor, and we print it and return null. In the base case, if the root is null, we return.
- Morning time.
- Environment was good.
- Interviewer was good.



Let the given string be “(()())((”.
Here the valid parentheses substrings are: “()”, “()” and “(()())”. Out of these the longest valid string is “(()())” which has a length 6.
It is a recursive problem, so I first thought in that direction. Then, I found that there were overlapping subproblems, so I thought about using dynamic programming.



1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
Step 1: I made a helper function where I passed the root node and 0, which worked as the sum in it.
Step 2: I made a base case; if the root is null, return.
Step 3: I went to the rightmost node of the tree, as the rightmost node is the only node that will have the highest value in the whole BST.
Step 4: I added the root's data to the sum variable, which was passed to the helper function.
Step 5: After adding the root's data to the sum variable, I updated the current root's data with that sum.
Step 6: I called the function recursively on the left side of the tree by sending root. Left as the root node and the updated sum in the helper function.
- Morning time
- Environment was good.
- Interviewer was good
1. What were my favourite subjects in my academics?
2. Which project I am proud of?
3. Why do I want to join DUNZO? Why not any other organisation?
4. What difficulties did I face when I learned the new tech stack and how did I overcome it?
5. How do I keep myself updated?
6. Which Data Structures I am currently studying?
7. Then he asked me if I have any questions for him. I asked two questions.
Tip 1 : Walkthrough in the code of project so you must know about project properly.
Tip 2 : Read about behavioural questions before.
Tip 3 : Brush up your knowledge on DSA.

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