Three time based Sections :
1. 20 MCQ's on basic technical and programming knowledge.
2. Debug the code.
3. Two Function based coding questions.
-> Based on Arrays and Sorting.
-> Round-Robin Scheduling (Enough information was provided to solve the question, so there was no need of having any prior knowledge of the topic). Based on Arrays.
(Initial Phase – About 20 minutes)
The interview started off with a warm hand shake and an exchange of trivial information with interviewer.
As soon as I settled down, he asked me to brief him about myself. He was quite interested in history of my hometown, so we had a small chat on it.
Followed by a discussion on my CV. He asked me about my ongoing project based on Android Studio, I clearly mentioned that I learned it myself and was at introductory level with the technology, he was satisfied with the enough information I shared with him. He then asked me about my POR’s mentioned, I quickly briefed him about it.
(Second Phase – About 60 minutes)
1. Find Duplicates in an Array of size n having elements ranging between 1 and n-1 with O(n) time complexity and O(1) space complexity.
I gave him two naive approaches using sorting and hashmap and explained the time complexity and space complexity for it. He then further added to solve it in linear time and O(1) space complexity.
As I didn’t knew the approach for this, I was blank for some moment but the interviewer was friendly and gave me some hints by asking a similar problem. I was able to pick up the hints and after a long discussion on approach, I gave him the final solution to the problem followed by a production level code for it.
He gave me some quick comments and feedback on approach and style of writing the code.
2. Write a function to get the intersection point of two Linked Lists (Y - shaped linked list)
I started off by giving him the naive approach using stack and explained the various complexities and edge cases for it. He further asked me to optimize it. I was able to do it. He seems satisfied with approach and told me to write the production level code for it.
(Third Phase – About 20 minutes)
Be prepared with your set of intellectual questions to ask the interviewer. It’s a great opportunity to fill any pit holes during the previous phases.
We had a good discussion on various topics like amazon ongoing projects, various teams, Amazon leadership principles, prerequisites for an intern, etc.
1. Mostly the question were from GeeksforGeeks, so it's better to cover the 'Must do' section of it beforehand.
2. Amazon interview for everyone was more or less on the same line, like problems on DS, followed by writing a proper code for it and discussion on TC. So reading about Amazon internship experience gives an edge to your preparations.
3. Never go on a mute state for a long duration, keep discussing your thoughts with the interviewer.
All the best !