Technical Interview 2

My second round was conducted by a very pretty and intelligent young lady. She helped me a lot, by giving suggestions and ideas to improve my solution.

Problem 1

Solution

My first solution was to find the distance of every node from node k using LCA and then print only those nodes whose distance is d. This is my idea. The time complexity of my solution was O(nlog(n)). She wanted it in
O(n). She helped me build all the logic and finally I was told to write the code.

Problem 2

You are given an array a which consists of only 0, 1 and 2. You have to sort the array.

Solution

My first solution was to hash the frequency of the array in one traversal and then fill 0s, followed by 1 and then 2s in second traversal. She was satisfied but wanted it in single traversal. This is the solution. I was told to write the code.

Amazon Pune Pool Campus Interview

Amazon pool campus placement drive was conducted in March 2019. There were total five rounds, first round being an online coding round was held on Hackerearth followed by three technical interviews and one bar raiser cum technical round.

Similar Reads

Online Round

There were 2 coding problems and 10 MCQs related to Operating System and DBMS....

Technical Interview 1

Problem 1...

Technical Interview 2

My second round was conducted by a very pretty and intelligent young lady. She helped me a lot, by giving suggestions and ideas to improve my solution....

Technical Interview 3

This was more of a general discussion on various fields of computer science rather than problem solving round....

Technical cum Bar Raiser Round

I was told give brief description about myself and my projects. He asked my role in the project. After which he gave two problems to solve....