# Amazon Interview Experience for SDE-1 | 6 months Internship (On-Campus)

Online Round: Around 250 candidates appeared for this round

The online round comprised of 4 sections:

• Code Debugging Round (20 minutes – 7 Questions)
• Coding Section (70 minutes – 2 Questions)
• Work Style Assessment (25 minutes)
• Aptitude and Logical Reasoning (35 minutes – 24 MCQs)

Coding Questions:

Different sets had different coding questions from some 5-6 questions. All the sections were fairly easy, but one needs to be a bit quicker to finish all the questions on time.

39 candidates were shortlisted for interviews. The interview process (Organized through Amazon Chime App – 5 days after the online round) consisted of two rounds.

Round 1 (F2F Interview for 35-40 minutes): Formal Greetings and Introduction. Tell me about your favourite project (2-3 minutes). Let’s jump to the coding questions (No discussion of any other stuff and also no counter questions on projects as well)

1. Given an array of random numbers, move all zeroes to the end of an array.
• For example, if the given array is {4, -2, 0, 1, 0, 0, 3, -7, 0} then the output should be {4, -2, 1, 3, -7, 0, 0, 0, 0}. The order of all the other elements should be the same.
• I have discussed 3 approaches and then told me to write down the optimized solution of O(n) time complexity and O(1) space complexity.
• I write down the complete code and then the interviewer checked all the edge conditions and also told me to dry run the code for the given input.
• https://www.geeksforgeeks.org/move-zeroes-end-array/
• I have discussed the approach first and then told me to write down the code (An only function which takes the head of the linked list as input and returns sorted linked list’s head pointer).
• I write down the code using Merge-Sort and the interviewer checked all the corner cases and also told me to dry run the code for the given input. Also asked about the time and space complexity of the code.
• Asked me if I have any questions.

24 candidates were shortlisted for the second round.

Round 2 (F2F Interview for 60-75 minutes): Formal Greetings and Introduction. Directly jump to the coding questions (No other CS Fundamentals questions and also No questions on any project or on the resume)

1. Given a sorted dictionary (array of words) of an alien language, find the order of characters in the language.
• I haven’t seen this question beforehand and also I am not so good at solving graph problems.
• It took me 4-5 minutes to understand the question completely. The interviewer also gave 2-3 examples to give me a better idea of understanding the question.
• I think about the different approaches but I didn’t think of a Graph-based solution so the interviewer gave me a hint after 3-4 minutes to rethink if the question can be solved by building the graph.
• After thinking 2-3 minutes I told the approach to solve the question using topological sorting and I described briefly about how the approach gonna work and also dry run on the pseudo-code using examples and then told me to write down the complete code.
• Although I found it difficult to write down the complete code. But somehow I managed and the interviewer also helped me whenever I got stuck.
• I write down the code using different logic but the approach for solving the problem is the same. Then the interviewer told me to explain the complete code line-by-line and also told me to dry run for the given 2-3 inputs and also checked all the corner cases and also asked me about the time and the space complexity of the code.
• https://leetcode.com/problems/alien-dictionary/
• https://www.geeksforgeeks.org/given-sorted-dictionary-find-precedence-characters/
2. There are given n strings of different lengths, we need to connect these strings into one string. The cost to connect two strings is equal to the sum of their lengths. We need to connect the strings with minimum cost.
• I have discussed 2 different approaches and also the optimized approach using a priority queue. Also discussed the time and the space complexity of the optimized approach.
• Also asked me how the priority queue is defined (Here, I told that it is acting as minHeap for this question) and looked satisfied with my answer. Then asked me to write down the complete code.
• It took me approx 1 hr to solve the first problem, so when I just started to write the second code, the interviewer told me that we’re running out of time and no need to write the code as my approach is correct.
• https://www.geeksforgeeks.org/connect-n-ropes-minimum-cost/
• Asked me if I have any questions.

Both the rounds went smoothly. The interviewers were very sharp and had sound knowledge. They were very friendly.

Finally, 17 candidates were selected for an Internship including me.

• The Interviews were conducted on Amazon Chime (A video calling platform).
• Coding questions were asked to code on Amazonâ€™s LiveCode platform where both the interviewer and the interviewee can simultaneously edit and view the code.

Tips:

• Interviews have a slight luck factor and kind of day dependency. I would advise you to wait for your day, and on that day I guarantee you, no one can stop you from getting what you deserve, just be confident and solve all the problems with a positive attitude.
• Be polite and carefully listen to the interviewer (you might be lucky to grab a few clues)
• Interviewers will help you whenever you are stuck just keep thinking aloud. Before jumping into the solution, understand the question properly, and avoid any assumptions regarding the problem statement and get them all-clear by asking the interviewer as many questions as possible. Think of all possible edge/corner cases. Discuss your solution with the interviewer and explain the cases that you are handling.
• Be thorough with Time and Space complexity calculation, as it is the first question you might get after proposing an algorithm to the interviewer.

Previous
Next