Amazon visited our campus for SDE-1 FTE hiring. There were a total of 4 round (1 Coding Test+3 Technical Interviews)
Round 1 (Coding Test): This round had 4 sections, debugging, coding, Workstyle Assessment, and aptitude. Debugging and aptitude were easy and didn’t even require any preparation. You just need to be a little quick in all these rounds.
In the coding round, 2 random questions were chosen for everybody from this pool of questions.
Try all the questions in the new and old sections.
Round 2 (Technical Interview 1):
- Two nodes of a BST are swapped, correct the BST.
- Given a number N, count the number of arrays which can be constructed such that the sum of elements is N. One constraint is that each element should be greater than 3.
Input: 6 Output: 2 Possible arrays: [3,3], 
I gave the recursive solution. They wanted the time complexity of that solution. which was something like (N-6)^(N/3). Then they asked for the optimized solution of the same using DP.
Round 3(Technical Interview 2):
- Given 2 numbers N and M count the number of set bits in them. He first asked me to make a function that returns the number of set bits of a number, then asked to code the solution. He wanted the most optimized solution something like this. https://www.geeksforgeeks.org/count-total-set-bits-in-all-numbers-from-1-to-n-set-2/ Which I was not able to give.
- Given dependencies like A->B, C, D and B -> D and D -> E. Print the ordering of the tasks. for ex E D B C D A. I came up with the topological sort solution https://www.geeksforgeeks.org/topological-sorting/. He wanted to look for all the edge cases and check if the code was perfect. I found the case when there are circular dependencies and changed the code accordingly.
- Then he asked for a few OS and networking questions like the Difference between semaphore and mutex, the Difference between TCP and UDP, and what is Banker’s algorithm. Then he jumped to my CV and asked about the Internship I did.
Round 4(Technical And Managerial): For me, the round was only for 45 minutes.
- Given a binary tree find the level with maximum nodes and give the sum of nodes at that level. He wanted me to use just the queue and nothing else, and then he asked to optimize it as the tree is huge. Then he asked for the time complexity of the same. I missed one edge case in this.
- Tell me about a time when you were faced with a complex problem and what solution you came up with? Then he asked if I could have done anything different and better.
- Tell me a time when I had to process a lot of data in a small amount of time? Again asked if I could have gone for any different approach.
Check this for more details. https://www.amazon.jobs/en/landing_pages/in-person-interview
In the end, there were 8 students who gave 4 rounds and 6/8 were selected including me?
Note: They were very serious about the time complexity of every algorithm. Prepare for the behavioural questions, and read about leadership principles and STAR format, mentioned in the above link.
They wanted the runnable code for every question also covering all the edge cases.
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.