Online Round: This round was held on Hackerrank for 1:30 hrs. There were two questions in this round.
- A tree was given with upto 10^5 nodes. There were 10^5 queries. Each query gave a node and the preorder traversal of its subtree was to be answered.
- There was an undirected graph with a source and a destination. The following actions would be done each minute –
- From the current node, choose a road along the shortest path.
- If you have reached the destination, then stop.
- Else, from the this node choose any random road except the one you came to it by, and go to step 1.
Find the time required in the worst case to reach the destination. If not possible print -1.
14 guys were selected for the next round.
Debugging Round: This round also had 2 questions for 1:15 hrs. The questions contained logical errors which needed to be corrected.
- A code was given which had functions to insert a node at the beginning of a circular linked list, and split a circular linked list into two circular linked lists of half the length.
- A code based on operating systems was given where multiple threads were being created which were reading from different input files and all of them were writing into the same output file. The restriction was that only 400 characters at time were to be inserted into the file at a time and all threads which couldn’t obtain access to the output file were waiting in a queue.
6 guys were selected for the next round.
The following two rounds followed the same pattern. There was one question in each round and all the students were simultaneously asked the same questions. After the interviewee answered the question, he/she was asked about their projects, or sometimes C/JAVA etc.
- In an infinite 2D plot. You are at location (1, 1). You have to go to (M, N), where 1<=M, N<=10^7. From a position (X, Y) you can go only to (X+Y, Y) and (X, X+Y). If it is possible to go to (M, N) print the path to be taken, else print NO. clearly from the constraints an O(N) solution was required. (Hint: try going reverse).
- You have an array of numbers. You have to give the range in which each number is the maximum element. For Example, If array is 1, 5, 4, 3, 6 The output would be
- 1 [1, 1]
- 5 [1, 4]
- 4 [3, 4]
- 3 [4, 4]
- 6 [1, 5]
Here also an O(N) solution was required.(consider using a stack).
5 of the students had answered the questions optimally in both the rounds. After the second round three guys were selected for HR round, While 2 of them had an extra round taken by all three interviewers combined, they were asked system design questions.
Round 3(HR): Usual HR stuff such as questions about resume, tell me about yourself, why this company, hobbies, future plans, choice of location, how do you deal with a non performing team member and so on.
The three selected guys were given a 6 month internship and FTE, and one of the guys from the extra round was offered only a 6 month internship.
I thank GeeksforGeeks for all the help in my interview preparation process.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.