Open In App

Amazon Interview Experience

Last Updated : 23 Sep, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

Round 1: Written-test

Two programs to write in any language. The laptop was also allowed to code and then write the final program on paper.

  1. Find minimum distance between source and destination in a matrix. See this post for details
  2. Print Binary tree in vertical order. See this post for details.

 

Round 2: Technical Round

Search element in array having special property.

Special property of an array is each element of it is either +1 or -1 to the previous element. The solution should have time complexity less than linear search.

The interviewer was helpful and giving hints to reach to correct solution. When the solution was finalized he asked me to write code for it covering every boundary case and other scenarios. Code should be production-ready.

I managed to write the code. Here is the post I found for a given problem

Round 3:Technical Round

Again it was coding round and Interview asked me below two programs

  1. Find 5 most frequent words from the given string. I found this post for a given question but I told hashmap approach to the interviewer and he said this is not the most efficient approach as string can be very big so iterating it twice is not good solution. In the end, I couldn’t figure out an alternative so he asked me to write a code for the initial solution only.
  2. Reverse a linked list in k blocks. see this post. I was aware of the question so I told him approach. He asked me to write code for the same. couldn’t complete it due to time constraint.

 

After Round 3, the HR person said I can leave for the day 🙁


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads