Amazon Interview Experience | Set 427 (SDE-2)

It was a recruitment drive at Pune, for Kindle team (Chennai).

Round 1 (Screening):

Two common questions were given to all. We’re supposed to discuss the approach to the problem with the interviewer first and then implement it after the interviewer is convinced with your approach.

  1. Postfix expression evaluation
    • Expected to handle all exceptions like invalid expression, invalid symbol in the expression, etc.
  2. Sort an array of 0s. 1s & 2s
    • I gave him the counting solution and another solution (both linear), but he wanted me to solve it in single pass, was expecting Dutch National Flag Algorithm. (fortunately still got shortlisted :))

Round 2 (Problem Solving):

  1. Convert Postfix expression to Infix
    • And there should not be redundant/unnecessary parenthesis like (a*b),  (a+b)+c, (a*b)+c etc. are invalid. But  (a+b)*c  is valid.
  2. All anagrams of a given string
    • Later asked me to modify the program to return the list of all the strings rather than printing them.
    • Also asked me to dry run the code for a sample input.

Round 3 (Problem Solving):

  1. Rain water trapping problem
    • I was stuck here, but finally able to get a solution.
  2. Print right view of binary tree
    • Can be done by level order traversal of tree.
  3. Clone a linked list with Next and Random pointer
    • Given the solution using O(n) extra space (using hashmap).
  4. What’s your biggest achievement in last 6 months?
After clearing these rounds, I was invited for on-site interview to Chennai for further rounds.

Round 4 (Design):

  1. Asked me to explain the architecture of one of the project from my resume.
    • Explained using class diagrams.
  2. Design a Whatsapp like service.
    • Given the high level design first, then dived deeper explaining load balancing, splitting into microservies and communication between them, notification service, message queuing, database sharding, etc.
    • Asked me how to maintain the sequencing of messages, since client’s time-stamp would be unreliable.
  3. Class diagram for a standalone Chess board game.
    • Discussion on the my design like, why this class/relationship is needed, why this method is in this class rather than that, etc. Convinced him for few of them, giving proper reasons, and made changes in the design for other few.
    • Pseudo code for all the possible moves of any piece.
After this the HR informed me that the feedback of my design round was quite good and also gave me suggestions to perform well in rest of the rounds.

Round 5 (Bar raiser):

Few questions to evaluate me on Amazon’s leadership principles.  I can’t remember them all 🙁

  • Have you ever mentored someone?
  • Any change/improvement you introduced in your previous organisation.
  • Reason for leaving the previous company
  • Reason for joining Amazon.
  • Are you aware of kind of projects being done at Amazon?
  • One of your biggest technical mistake.

And one algorithmic problem at the end. Diameter of a binary tree

  • Asked me to return the 2 corresponding nodes (at the end of diameter) instead of the diameter.

Round 6 (Hiring manager):

  • Some discussions about my previous companies and projects.
  • One algorithmic problem.
    • Given a result of a competition among all the students of a class, write a program to make students stand in a order such that every student must have lost to the student in his/her immediate left and won against the student to his/her immediate right.
  • Some leadership questions. Again can’t remember them all.
    • Most challenging technical task and how did you solve that.

Note:  In problem solving rounds, you’re supposed to write a working code in any language of your choice, handling all the corner cases.

Finally got an offer after 3 days!! 🙂 All the best!! (y)


Write your Interview Experience or mail it to contribute@geeksforgeeks.org

Join Free Interview Preparation Course



My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. 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 :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.