Problem of the day
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.
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.
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 ...
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 wa...