Applied through Amazon jobs portal.
Number of rounds – 5
Overall time taken (from giving OA to “you’ve been selected” call) – 1.5 months.
Round 1 – Online Assessment
- P1 – k nearest points to origin.
- given some points, return the k nearest points from (0,0). Distance = geometric distance.
- P2 – given an array having both positive and negative values, find out the top k subset sums.
- couldn’t pass all the test-cases
- I strongly believe its NP hard.
- couldn’t find any solution for it later on also.
Round 2 – DSA + 1LP
- Find peak element in an array, dry-run the code
- gave O(n) solution at first.
- optimized it to O(logn).
- Covered the edge cases as well.
- kth smallest element in an infinite stream of numbers
- maxheap + comparison with root for insertion.
- she asked me to then implement the heap, which I found challenging, but then I implemented it, also demonstrated good OOPs principals while doing so.
- LP – tell me about a time when you reported an issue and it got implemented.
Round 3 – DSA + 3LP
- Find unique triplets in an array which sum to a given number.
- gave O(n3) solution
- optimized it to O(n2) using sorting + two-pointer approach.
- Re-order Linked List
- gave O(n2) solution first.
- optimized it to O(n) – split the list, reverse the second half, and then merge them alternately.
- LP
- tell me about a time when you received feedback from your peers.
- how do you prioritize customer experience and aesthetics of a project?
Round 4 – BarRaiser (2 DSA + LP)
To be frank, I thought we’d have in depth DSA discussion here, but I guess the person who conducted my interviews was kind of in a rush (he mentioned there was some prod-issue going on)
- • Find loop in a linked list
- first gave solution using hashing approach, he asked me to reduce space complexity
- gave the slow-pointer and fast-pointer approach
- he asked for the proof, so gave that as well (understand the proof for this question).
- Find kth largest element in an infinite array
- I first gave the quicksort solution, he asked me to reduce the time-complexity
- so I gave the priority_queue solution. He was satisfied.
- I wanted to tell him that I faced a similar question in previous round as well, but since there was time constraint I just let it be.
- LP
- tell me what you have learned in coding field apart from what you had to learn as a part of your work.
- any questions for me?
Round 5 – FinalRound (DSA + more of LP)
This was taken by two SDMs together. I got really intimidated, so I kind of stumbled in some LP questions.
- Given a list with next and random pointers, deep-clone it.
- I gave a hashMap solution where I map every node from L1 to its copy in LClone.
- he asked me to reduce the space complexity
- so I gave this solution which requires reorientation of random pointers and two traversals.
- He then said what if the original list is immutable?
- so I gave an O(n2) approach where for every node, I count how far randomPointer is from head, and do the same for the node in clonedList.
- LP
- tell me about a time when you were stuck, and couldn’t proceed at all. Why were you stuck? What was the point where you decided to simply ask for help.
- he asked about my work-experience, what have been my learnings
- tell me about a time when you implemented a solution by yourself which helped the overall work-process of the team.
Verdict – Selected.
Compensation - https://leetcode.com/discuss/compensation/1703647/Amazon-SDE1-or-Bangalore-or-January-2022
My overall review
• Heavy focus on in-depth understanding of DSA.
• You should have good stories to tell for LP questions, preferably from your work-experience if any, otherwise from your projects.
• OS, DBMS were not asked to me at all but it really depends on the interviewer.
• Keep in touch with recruiter, otherwise scheduling of interviews might sometimes get delayed.