Amazon Interview Experience | On-Campus for SDE-1
First round was an online test consisting of 2 coding questions and 28 MCQ’s on mettl. Level of coding questions vary from easy to medium. Everyone had different coding questions. Few which I remember are:
1. Inversion count in array
2. Postfix evaluation (handle negative number also)
3. Mean median mode in array
4. Dice throw puzzle(DP)
5.Roots of quadratic equation
6.Linear equation in one variable
7.Longest common subsequence
8.Evaluate Infix operation (handle negative number also)
MCQ’s were difficult and required deep knowledge of DSA and C C++.
Out of around 350 students 53 were called for interview.
Interview lasted for 25 minutes and had thorough discussion on 2 questions. He directly started with coding question.
- given a string encode it. Eg. aaabb -> a3b2
- there are n person with their height and weight given. You have to select maximum number of person that can stand in a queue with condition that height and weight of person in queue will always be less or equal to next person.you have to return persons not the count. (LIS)
This round went well and I was immediately called for next round.
This round lasted for 30 minutes.
- Given k arrays of size n each. You have to select one number from each of them such that the difference between them is minimum. INitially question was given 3 array, I told him the solution quickly then he changed it to k.
- Implent AVL.
- a question on designing a data structure i dont remember. I used hash for that. He asked me about hash worst time complexity, ideas to improve it.
- A question on trie.
- median of running stream of integers.
- Given an array of n integers ranging from 1-n-2, in which every integer comes once and two integer comes twice, find both of them.
I have to write code for every question. This interview also went well and I was called for next round immediately.
This round went for 90minutes. This was different from previous two. It was more of a discussion round.
- Project discussion.
- Range Sum query with update. I told him prefix sum. He wanted better approach. I told him segment tree.
- He then asked range update in best optimised way. I told him Lazy propogation. I had to write code for segment tree with lazy propogation.
- 1 hour discussion on networks. (I told him I haven’t revised but he kept on asking)
This round also went well. In networks he provided some input when i needed. Since it was late my next round was scheduled next day.
Round 4(Bar raiser)
This round went for approx 1 hour.
- Wildcard Pattern Matching. I discussed all corner cases and base cases along with recurrence relation. He asked me to write code in bottom up dp. He was really happy with my solution.
- Design a data structure for running stream of string. You have to print a word if it has not come within 10 second else ignore it. You have to manage memory in most optimal way. I discussed varios approach using trie, hash, lru. Whwn I told him my solution with queue and hash, He was surprised an told me that he didn’t thought of that solution. He asked me to code it.
- project discussion.
- oops- How abstract class is implemented by compiler. When I told him the solution he told awesome.
I was sure of my selection as I had seen my remarks sheet and all my remarks were strength except for cs fundamental in 3rd round which was mixed, and also 4th round was good.
Result announced at 12:30 a.m. total 9 got selected for FTE and I was one of them.
Share your thoughts in the comments
Please Login to comment...