Amazon Interview Experience

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 🙁

Write your Interview Experience or mail it to

My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :


Please write to us at to report any issue with the above content.