Skip to content
Related Articles
Amazon Interview Experience for SDE-1 | Off-Campus 2021
• Difficulty Level : Hard
• Last Updated : 11 May, 2021

I applied to amazon through their career page https://www.amazon.jobs/en/ . The Job ID was mentioned in Linkedin Post by some SDE-2 at amazon. At that time I was already working in some firm as a Software Engineer with 11 months of experience. After a week I got a link to online coding round.

Coding Round: 2 coding questions were asked on HackerRank to be solved in 2 hours. Both the questions are easy, and I was able to solve both of them completely. Each Question has a separate other question associated with it where you have to mention your approach along with time complexity.

1. Amazon Prime Music Time :- You’re a given List of N songs (0 to N-1). You have to select exactly one pair of songs (both songs should be different) such that they end 30 seconds before the given time limit, If multiple pairs are possible, then return the one which has the largest duration of the song. If two pairs have the same largest duration song, then return one which comes first. You have to return indexes of those pairs. If No such pair exists, then return <-1,-1>

```Sample input:    time limit = 90
songs_duration = [1, 10, 25, 35, 60]
Sample  Output: [2, 3]

As we can see, songs with index  2(25) and 3(35) have a total duration of 60, 30 seconds less than 90.```

2. Demolition Robot :- Given a matrix with values 0 (trenches), 1 (flat), and 9 (obstacle) you have to find a minimum distance to reach 9 (obstacle). If not possible then return -1. The demolition robot must start in the top left corner of the matrix, which is always flat and can move on the block up, down, right, left. The demolition robot cannot enter 0 trenches and cannot leave the matrix.

```Sample Input:
[1, 0, 0],
[1, 0, 0],
[1, 9, 1]]
Sample Output:
3```

Link: –  https://leetcode.com/discuss/interview-question/1033264/amazon-oa-1-year-experienced-for-sde1

Next, I got a call from HR after 2 weeks to schedule online interviews on their video conferencing application amazon chime. 3 rounds were supposed to happen on same day.

Round 1 (Amazon Chime –  1 hour): The interviewer first asked me to introduce myself and one of the current projects I have worked in my current firm and then what challenges I faced and how I handled it. Then he jumped to coding problem. Two questions were asked. I was Expected to write full working code, and it was tested on multiple test cases by interviewer.

1. https://leetcode.com/problems/rotting-oranges/
2. https://www.geeksforgeeks.org/find-all-possible-trees-with-given-inorder-traversal/

Both questions are their frequently asked questions. I was able to solve both of them.

Round 2 (Amazon Chime –  1 hour): After half an hour later, there was a second-round taken by SDE-2. He asked about how my first round went. Then asked me to introduce myself and a brief overview of my project at my current firm. He jumped to coding questions.

1. https://www.geeksforgeeks.org/program-count-numbers-fingers/. I was able to solve this question very quickly. Then he asked me to code it and tested in multiple cases. He changed the number of fingers to 3 and 7. I told him the solution then he asked me to generalize it for k fingers. I struggled a lot. Then he started giving some hints. Basically, we can store the pattern(you will see in question once you start thinking of solution) in an array, then take remainder from 2k-1(from the pattern you will observe) and can return the array[remainder]. This will be solved. It took me quite hints to reach there. This takes almost most of the time.
2. Since my expertise was python then he asked a simple python question. https://www.geeksforgeeks.org/python-converting-all-strings-in-list-to-integers/. Most of the solutions are O(n) so I gave them (like iterating and converting each element into integer and storing it in a new list, or we can use list comprehension). I also suggested a panda’s based approach where we can convert the list into a pandas data frame and then use lambda function. I was aware that this is much faster but not aware of the complexity. He suggested to not think that far. No need to use pandas. I got confused then he concluded the interview.

Round 3 (Amazon Chime –  1 hour):  Just after the second round, my third round was scheduled without any break. This round was taken by Engineering Manager at one of the AWS Teams. He introduces himself and told me that the reason he is taking this interview since hiring is going for his team. He asked about myself and then one of the projects I have worked on in my current firm and challenges I have faced and how I overcame them.

Then he Jumped into questions.

1. Given two CSV files with the same number of rows and columns, check if these two files are equal or not. I told them to convert each file into the matrix and then check if each element is the same or not. https://www.geeksforgeeks.org/program-to-check-if-two-given-matrices-are-identical/. Don’t know what an optimized solution to this problem is. Since he says you are giving brute force solution. I want an optimized solution. I struggled then he switches to the next question.
2. Difference between HashMap and HashTable.
3. What is Concurrent HashMap
4. Difference Between Collections and Set.
5. What is Constructor? It’s use case with an example.
6. Explain Polymorphism, it’s Types with an Example.
7. Difference Between Call by Value and Call By Reference. Give Example. Which we have to use and when?. I gave an example similar to Reader-Writer Problem. He simplifies it by making a master process that can update a variable. 5 slave processes can only read it. Slaves can execute concurrently, but when a master is writing, slaves can’t access the variable and vice versa. Which processes can use call by value and which can use call by reference. Explain. I was able to properly explain it and he seemed satisfied.
8. A Situational Based Question – Have you ever tried moving out of your comfort zone?? When and how it impacted Business and your life.

Well, I didn’t think I answered this question very well.

At last, he told me about his team’s tech stack which is mostly other than my current domain. There is supposed to be another more round after this round.

Verdict:- Rejected

Well got a mail next day regarding rejection. The reason for rejection is that my 3rd round didn’t go too well.

1. Few things I notice, Firstly Questions are mostly from their archive. Make sure to go through as much as interview experiences available in GeeksForGeeks.
2. Secondly,  Managerial Round has a lot of weightage. Be well-prepared for Situational and HR-based questions. Their Recent trend has shifted to this to check if a candidate has desired leadership and managerial skills or not. If they can handle pressure or not.
3. Thirdly, most of you might know, Luck matters a lot. As in my case, they were more concerned about Java however my expertise was python which I clearly see he is not impressed with it.

Hope this helps, Best of Luck…….

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up