Amazon Interview Experience (On-Campus)
Amazon visited our campus for FTE recruitment in Aug, 2019.
Round 1(Online Screening Round): There were different sets of questions. Each set had two coding questions and mcqs based mostly on c/c++. My coding questions were 1) https://www.geeksforgeeks.org/counting-inversions/ and 2) finding the number of derangements.
Round 2(F-2-F): Started straight away with ds algo stuff. First question: https://www.geeksforgeeks.org/k-maximum-sum-combinations-two-arrays/. Second question was based on topological sort of a directed graph. I had to write code for both questions. Attention was given to code quality and edge cases.
Round 3(F-2-F): Again, the focus was on ds algo.
- At first, was given a stream of transactions and the task was to find the kth most expensive transaction. A few approaches were discussed, and then I had to code up the best approach I could come up with.
- The second question was https://www.geeksforgeeks.org/find-number-of-islands/. Had to code it up. The third question was a modification on finding the intersection between two linked lists. There were other small questions in between, specially pertaining to Priority Queue and its implementation.
Round 4(F-2-F): Given a hierarchical structure, where a node calls another node for a service, and that node may call other node(s) for a service, find the longest time taken for two ‘leaves’ of this hierarchical structure to communicate with each other. This was just a modified version of finding the longest leaf to leaf path in a tree-like structure.
- The second question: https://www.geeksforgeeks.org/nuts-bolts-problem-lock-key-problem/.
- 3rd question was finding the largest island in a grid.
- There were small other questions as well, like the previous round.
- Had to code everything.
Round 5(Bar Raiser):
- Discussion about CV.
- Why I am sitting for coding profile, being from a non CS/IT background.
- Then, was asked to implement LRU Cache. Special notice was taken on the code.
- Then, was asked the trapping rain water problem, but do it with O(1) space and single pass. Had to code up the solution.