Amazon Internship Interview Experience | On-Campus 2021
Round 1: Online Assessment:
- Debugging: Solved 7/7, time limit was 20 minutes.
- Problem-based on binary search.
- Worklife assessment: Don’t know the time limit, was sufficient. (The mail mentioned it would be 20 minutes but there was no timer in this section).
- Aptitude: 24 questions in 30 minutes.
Round 2: Interview
There was only 1 round of interviews for Summer Internships, duration ranged from 30 minutes to 80 minutes. Most were over around 50 minutes.
- The interviewer introduced himself and then asked me to introduce myself.
- My interview lasted for only 30 minutes
- He told me that my interview was going to test me on my coding and problem-solving skills.
- First, he asked me what a Linked List is.
3 Coding questions followed:
- Swap Nodes in pairs https://leetcode.com/problems/swap-nodes-in-pairs/,He asked me to write the structure of the Node class for the Linked List first. Then I gave him an iterative approach. He told me to code it. As I started writing the code, I thought recursive would be cleaner, I said the same to him, and he told me to code whatever approach I want. I coded the recursive implementation. Once I was done, I told him that the code is done, just let me dry run it once. He said, let us do it together, he gave me input, and I took him through every line of the code, what value was being stored in each variable after each line, I wrote all of this down in the comments, he was satisfied with it and moved on to the next question.
- Print all subsets of the given array https://leetcode.com/problems/subsets/.I gave him a backtracking approach and told him how my code would execute on a given set of 3 elements, once he was satisfied, he asked me to code it. Once I was done with the code, I had to again take him through the dry run of the code on the same set of 3 elements, the recursion went very deep during the dry run, I got a little confused after 3 subsets were printed but I was able to go through till 4 or 5 subsets, he was satisfied then.
- Level Order Traversal of Binary Tree https://www.geeksforgeeks.org/level-order-tree-traversal/ Since my first 2 questions were on the easier side of the medium questions, I figured he might give me a harder question now, but to my surprise, he gave me the easiest question possible. I told him the queue implementation, he gave me a binary tree, I showed him by writing down the queue state in each iteration and printing the output. Once the complete level order traversal was done he told me to code it.
Tip: If you’re explaining the dry run of a recursive code, maintain a call stack, and keep pushing all the function calls onto the stack, I didn’t do this so I got confused when I backtracked as I forgot what the last call was after 4 levels.
After the code was done he said that will be it, do you have any questions for me? I asked him about the tech stack used at amazon and at his team.
My Personal Notes arrow_drop_up
Please Login to comment...