Amazon Interview Experience(SDE-1) With Questions

hardik dadhich
5 min readDec 27, 2019

--

Story of a tier-3 college student who got a chance for an Amazon Interview(SDE-1)

Being a student of the tier-3 college, lots of student wants to know how they can be interviewed in Dream companies like Google, Amazon and Facebook. Fortunately, I got the chance to be interviewed in Amazon India. So here I am sharing my experience so most of the guys like me can get benefits and prepare accordingly.

Note: Prepare to solve question on pen paper instead of Computer screen that will help you more.

How I got Opportunity to participate in Round 1:

I got a referral from a person on LinkedIn who is an employee at Amazon. He invited me for an on-site Interview procedure that happened on 21/12/2019 (Saturday )at the Bangalore office.

Some other ways to get a referral which I got to know from other candidates that were present there:

  1. InterviewBit Academy
  2. Coding Ninjas

My round was scheduled at 12:00 in the noon. I reached 20 mins early before Interview scheduled. We got visitor badges from Amazon and moved to our respective places where First round was supposed to happen.

Round one:

The Round was paper pen coding round. There was three paper set “[Set-A, Set-B, Set-C]” with each having 2 different questions which we suppose to complete within 1 hour. In my set the questions were as follows:

  1. Add two numbers represented as LinkedList Nodes with consideration of carries. (here)
  2. Find all triplets from the given array with sum is equal to zero. (here)

For these, we had to write code on paper. I took care of following things in my mind.

→ Modular code using functions and classes.

→ Neat and clean code with tested multiple dry runs.

Result: Round First Cleared.

Meanwhile Amazon gave us lunch....... ;)

Round Two:

It was a face to face round with the Interviewer based on pen-paper. After asking my resume, he read it very carefully. Then he started with his questions. This round was pure on DSA, Algos and Coding.

Questions were as follows:

  • He gave me paper and told me to write code to check if LinkedList has any intersection point or not. (Here)

— The interviewer was very interactive. He kept asking me the approach and so our discussion was very active. I didn’t solve the problem before so I was hitting the solution and within 2 hits I got the correct approach to solve it. As we finalised the approach he told me to write neat and clean code for the problem. So I did that. After trying with a couple of test cases, I was confident with my solution so I gave him the code and he approved it.

  • The second question was to write BFS(Breath first search)for tree traversal I did that using queue. further, he asked me its complexity.
  • The third question was somehow related to the second one. It was some burning tree problem and I have to find the minimum time to burn the complete tree. (problem_here).

— I have seen this type of problem for the first time so it was a bit tricky. Somehow after 20 mins of discussion on the approach, I was finally able to crack it. Meanwhile, Interviewer was giving me hints so I was able to crack it. Then he told me to code it. “The Approach was to find the longest path in the tree which we call the Diameter of the tree”. I was able to write code and further, he asked the complexity.

For those who want to know the complexity of the last question’s solution, it is 2*(V+E).

So Interviewer was satisfied with my answers so I was hoping that I would go to 3rd Round. As I was waiting for the result and got my name shortlisted.

Round Three:

This round was a mix of DSA and Computer fundamentals. After a few minutes, the Interviewer called me for an interview. Where the questions were as follows.

Again it was paper-pen coding round.

  • You are giving the sorted array of repetitive numbers and I have to return the index of the first and last occurrence of the given number without using any extra space. (problem_here)

— This type of question I have solved before so I suggested him two-approach in O(N) and O(log N) time complexity.

  • The second question was a bit tricky. It was about to print given n-array tree in spiral order (problem_here).

— Well, being honest I was stuck in that problem using the recursive way it took me fifteen minutes to solve this problem. I wrote my code and it was having some bugs but Interviewer gave me a chance to fix it. so I did that and that round turns to Computer fundamentals.

  • He asked me a couple of questions related to OOPs programmings like Difference between Abstract class and Interface.
  • Data Encapsulation and Data hiding.
  • Heap vs Memory.

I gave the answers with examples and cleared the round successfully.

Round Four:

This round was not technical round it was some sort of risk analysis round. The Interviewer asked me a couple of questions based on my work. Which are as follows:

  • Tell me the case which happened with you while your code review process went into bad and how you handle it.
  • Some Incident about where you find a minute difference in your code structure and what was that.

— I answered these questions according to my experience and hoping best to clear the round.

But …. I got to know that I am not shortlisted for next round. I don’t know the exact reason but anyways that was a good experience.

Tips to crack coding/Technical Interview rounds:

  • Do code practice first on paper than on PC.
  • Before submitting your code test it with multiple edge cases.
  • Try to write functional code using classes.
  • Be interactive in the interview you may get a hint that can help you to crack the problem.
  • Be consistent on codechef, codeforces and other coding platforms.

Thanks for reading this and All the best for your next coding interview :)

--

--

hardik dadhich

Amazonian | Developer | tee-troller | Talks about Interview Experiences | Distributed designing | Cloud stack & many more