Amazon SDE I – Interview Experience
I tried contacting Amazon recruiter via LinkedIn. Shared my resume with the recruiters via LinkedIn InMail. One of the recruiters responded back and shared a link for the online coding round.
Status: SDE 1
Location: Bengaluru, India
Round 1 – Online Coding
This consisted of 2 questions. Both the questions were based on Sliding Window Algorithm.
Round 2 – F2F (Virtual)
We started with a brief introduction. The interviewer introduced himself and then asked me to introduce myself with a brief introduction of the project I am currently working on.
The interviewer expected an optimized approach but mine had O(n) space 😢
We did discuss O(1) approach but my code was not correct.
Question 2 – Given an array of digits. Sort digits such that all the multiples of 11 are in the front of the array. The constraint is that the order of the elements which are multiple should be maintained.
Input – [1, 11, 3, 45, 121]
Output – [11, 121, 1, 45, 3]
Note: Here order of elements that are multiple of 11 is maintained.
Round 3 – F2F (Virtual)
Question 1 – Given a binary tree where root-to-leaf path represents a number. Return the sum of all such digits.
For above image, output should be
1247 + 125 + 136 = 1508
Follow-up : Now if the digit is represented as level order till a node is leaf, ie,
12345 + 123456 + 1234567 = 1370368
Question 2 – Given an array of positive integers, find the contiguous sub-array with given sum K.
Find subarray with given sum | Set 1 (Nonnegative Numbers) - GeeksforGeeks
Given an unsorted array of nonnegative integers, find a continuous subarray that adds to a given number.
Round 3 – Managerial Round
This was more of the managerial round. The interviewer asked me multiple situation-based questions based on Amazon Leadership qualities. I used STAR methodology for formulating my answers to the questions. I was not asked any technical questions in this round.
Round 4 – Bar-Raiser
This round started with a quick introduction about me and the project I’m currently working on. Then we moved to technical questions:
- Add two numbers represented as linked Lists. Make sure the code is production-ready.
I started with a solution that uses reversing the linked list. The interviewer asked me to think of another approach that will not need modification of the input lists. Then I came up with the recursive
2. Given a list of strings. Return all strings that do not have any anagrams in the list.
eg > [“aba”, “aab”, “bba”, “cda”, “adc”, “vvv”]
Output = [“bba”, “vvv”]
After this, the interviewer asked me some behavioral questions like what are the challenges you faced, how do you approach any new feature, etc.
Result — Got the offer! 🎉
That’s it… Hope you liked this post. Please feel free to drop in your comments to improve this post and clap-clap if you like this post.