Amazon Interview Experience (Off-Campus for SDE-1)
First, there was shortlisting on the basis of cpi and board percentage I guess.
Round 1: Round 1 was coding round consisting of 2 coding questions and 28 MCQs on based on output, data structures and algorithms. The first coding question was to convert infix expression to postfix ( https://www.geeksforgeeks.org/stack-set-2-infix-to-postfix ) and the second was to find the mean, median and mode of the given array. This round was for 1 hour 30 minutes.
After getting shortlisted, a total of 4 face to face interviews were to take place, each being eliminative in nature. The time for each was fixed to 45 minutes each and each of them involved writing the complete code on paper.
Interview 1: Started with my introduction and then 2 coding questions.
Question 1: Given an array, find the number of sub-arrays having even sum.
After brute force, I derived the formula and the interviewer was satisfied.
Question 2: Given an array of 0s and 1s, and a number m, you can flip maximum m zeroes, count the maximum length of 1s you can make by flipping at max m zeroes.
I tried it for some time and approached it right. But then, according to the interviewer, I got off-track to which I explained my approach to him and he verified it with a few test cases. My approach was also right and he was convinced.
Then I got shortlisted for the next round.
Interview 2: Started with the interviewer’s introduction and then one question on networking (since my project involved switches) and then 2 coding questions.
Question 1: Given two very large numbers represented as a vector, multiply them.
Coded it right.
Question 2: Print the boundary traversal of a binary tree.
Coded this too.
Interview 3: Started with my project and then coding.
Question 1: Given a dictionary in which the length of all the words are equal, you are allowed to change just one character. Given a starting word and an ending word, what will be the smallest number of steps required to change the starting word to the ending word.
Solved it in first attempt (the interviewer seemed a little surprised at this).
Question 2: Given a pointer to a node in a linked list, delete the given node in O(1).
No code, only the approach.
Final Interview: Again with my project and internship.
Question 1: Given a Linked List and a number k, reverse the Linked List in groups of k.
Question 2: Same as the first question in round 3.
The interviewer asked only the approach and complexity and then one more question.
Question 3: Given a number, find the next greater number that can be formed using the same digits.
Could only reach the approach, time expired, hence could not code.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. Google , E-Litmus and Microsoft Test Serieses.