Amazon SDE2 Interview Experience #1

How I aced my interviews at Amazon.

I am writing this blog to motivate the people who are looking to work at one of the top tech companies. This blog is about my interview experience at Amazon for SDE 2 profile.

How to prepare:

  1. First of all, a good knowledge of data structures is necessary. Your choice of the correct data structure to tackle a problem can make your life so much easier. So, I went through the basics of Linked lists, trees, stack, queue, and graph. First, you can read/learn the basics from any website/book. But most importantly the practice of solving coding problems for online rounds is must, I practiced on InterviewBit mainly. The reason behind it – Awesome product and I love it when I use it, you should try and thank me later.
  2. Covering your project is also a must. Go through your project 2-3 times especially the design and architecture of your project. I prepared my project by writing the important points on a notebook. It’s easy to think that you know every detail of your project, but the problem lies in explaining it. Write some points and read them and think If anyone who has no idea about your project will be able to understand it!!
  3. Gain confidence by practicing the: explain your project question. Try it, discussing your project with confidence is really necessary!


Points to remember:

Write clean code, people are friendly and they’ll push you to your limits. Be honest and answer confidently.


The Interview:

First round (Online coding): [On InterviewBit]

Question 1: Implement LRU cache (some code was given I needed to write remaining).

Question 2: I don’t remember!

Onsite rounds (Hiring drive):

First round: (DS and Algorithm)

  1. Next lexicographic permutation of a string. I took some time to think for an approach, interviewer pointed out some test cases that were failing. So, I thought for some more time and told him the approach but it was not fully correct. He moved to the 2nd question.
  2. Add two linked lists representing numbers – Instantly told him reverse approach, he told me lists are very long. Then I told him recursive approach, he was ok with it. he asked to write code for it. I wrote it in 5-10 minutes with the explanation of the code.
  3. This round took 1 hour.The interviewer was expecting to the point solution with running code.

Second round: (DS and Algorithim)

  1. There are two documents they contain productId and productName and you need to provide the top k products that are bought most. The solution is minHeap! This interviewer was really friendly, I was thinking of a DS and was discussing with him simultaneously, he pushed me for the better approach, In the end he asked [I gave him the approach to maintain the map for <id, frequency Of Product>] what If there are multiple maps like this and one machine has no hardware to support it, you have multiple machines then how will you implement it so that you can provide the merged details? (a little bit towards distributed)
  2. DFS code (asked me indirectly)- asked what will you use BFS or DFS and when?

Third round:(Hiring manager round)

  1. Was asked to explain the best project I’ve done? (15 minutes)
  2. What have you done for a customer that made him happy?
  3. Why should we hire you?
  4. Why are you leaving your company?

Fourth round: (DS and Algorithm)

It was a very fast round- 20 minutes or something

  1. There is a binary tree and leaf pointer are connected in a way like if left of PA to PB then right of PB will point to PA (PA and PB are leafs), find the height of the tree.
  2. Implement LRU cache, wrote the whole code in java.

Fifth round: (Telephonic last round- Manager level)

  1. Project discussion: what is the out of the box things you did in your solution to help the customer – I talked about extendibility, scale, multithreaded features of my solution.
  2. How to check if a binary tree is BST – wrote code on the shared screen and then explained it to him. He asked for the edge case I already have handled.
  3. He also asked about why do you want to join Amazon, why are you leaving your existing company- He was not satisfied with my small answer, I had to give him the explanation in detail.


That’s all. After few days, I got the call regarding the offer.

3 thoughts on “Amazon SDE2 Interview Experience #1

Leave a Reply