Tip 1 : Regularly practice atleast 10 questions on various topics
Tip 2 : Participate in coding competitions to experience time bound coding
Tip 3 : Give mock interviews for better results
Tip 1 : Mention the projects clearly, explaining the tech stack, the problem solved and whether its a group or individual project
Tip 2 : Do not put false things on resume.
Tip 3 : Mention only those skills, in which you are confident.
It was in the late afternoon. I was vey nervous, but the interviewer was very friendly. I managed to solve the questions early, so we discussed general things about the company and its culture.



1. Room 0 is the only room that is initially unlocked and doesn’t require any key to enter.
2. Any other room can be visited only if you have the key to that room.
3. More than one room can have keys to the same room.
4. You are allowed to visit rooms in any order.
5. You can visit any room multiple times.
Step 1 : I proposed a Depth first search based approach to solve the problem. Collecting the keys from the first room, then moving one by one to all the rooms, whose key is found. At the same time keeping record of the rooms, which are visited. At the end, i checked, whether all rooms are visited or not.
Step 2 : The interviewer was satisfied with this approach.



In the given linked list, there is a cycle starting at position 0, hence we return 0.

Step 1 : For detecting loop I followed a two pointer approach, one slow pointer and one fast pointer. If two pointers meet, then there is loop
Step 2 : For finding the initial position of the loop, i started one pointer from the beginning and another pointer from the node they met while detecting the loop. The node where these two pointers meet again, the the initial position of the loop.
The duration of the round was 30 minutes. It was conducted in the morning hours. The interviewer asked me many questions regarding my internship experience and my project. Later we discussed some problem solving.
Suppose, your company has taken over another company. The product has a huge code base. Your manager has assigned you a task to find the dead code and eliminate it.
Tip 1 : You should have a good knowledge on how compiler works
Tip 2 : Read about what is dead code, and how it is eliminated in compiler
This round was conducted early in the morning. The interviewer was highly experienced and very friendly. He discussed about his life journey and his experience with the company.
Overall the experience was good, getting interviewed by such experienced person
You want to design a game, 2D game. There are many objects in on the screen. You need to find whether these objects are overlapped or not. Size of the screen is given.
For simplicity, take the shape of the 2 objects be rectangle.
Step 1 : I discussed various constraints with the interviewer
Step 2 : Then i solved the question by comparing the top left and bottom right corner of the two rectangles.
Step 3 : I coded the function, and performed some dry runs in order to explain the approach.
Step 4 : Interviewer gave me some corner cases, and i improved my solution further.
Step 5 : Interviewer was happy, and moved on to the next question.



For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3
1
/ \
2 3
/ \
4 5
Output: 2
Explanation :
In the zeroth minute, Node 3 will start to burn.
After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.
After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree.
So, the whole tree will burn in 2 minutes.
Step1 : For this question, pointer to the parent is also required. I asked the interviewer, what all information i can store in the node. He said, i am the developer, and i can store whatever information i want. So i stored the pointer to the parent in the structure of the node.
Step2 : I applied level order traversal, upwards and downwards, to spread the virus.
Step3 : Interviewer was happy with my approach.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?