Amazon Summer Internship Interview Experience (On-Campus)

Sanskar Garg
4 min readApr 12, 2021

The opportunity was On-Campus through our Training and Placement Cell, LNMIIT. It had total of 2 rounds.

Round 1 (Online Round):-

This was a online round consisting of 4 parts:-

Part 1( Debugging ) :- In this we were given 7 questions, each had a code and a description which tells us what the code was supposed to do. We had to find and correct any errors according to the description. This part was very easy as the tasks which code performed were very basic ones. We were given 20 minutes for this.

Part 2( Coding ) :- In this we were given 2 coding questions. Difficulty level varied greatly as the questions each person got was very random. We were given 70 minutes for this. My questions were:

Question 1: Given a list of words remove all the words which already have an anagram of it in the list. Basically we were supposed to keep the 1st word we encounter and remove all it’s anagram from the list. I used HashMap to keep track of anagram.

Question 2: Given two strings s and t, first find whether s is a multiple of t or not. A string x is multiple of another string y when we can concatenate y some integer number of times to make x. If s is not a multiple of t then return -1 else find the minimum length of a string such that s and t both are multiples of that string. The first part was very easy. I calculated this using the lps array of KMP algorithm.

Part 3( Work Style Assessment ) :- Around 60 psychometric questions were given with choices and we were supposed to mark according to us. My advice would be to choose the honest answer, not the answer which is good.

Part 4( Logical Reasoning ) :- In this there were around 24 questions with 35 minutes. Question navigation was turned off for this round, that means we can only attempt questions sequentially and cannot go back to previous questions. This round was fairly easy.

Round 2 ( F2F Online Interview )-

31 students were shortlisted for this round. Many students who were able to complete both coding questions were not selected whereas some who were able to complete only 1 question were selected. So other parts were also important.

Interview :-

First I was told to introduce myself and then the interviewer started with the questions.

Question 1:- Given the root of a binary tree find the minimum number of edges between any 2 leaf nodes. If there is only 1 leaf node return 0. The code should be able to handle all edge cases. This was a easy question.

Question 2:- Given a number n, find number of unique ways to reach nth stair from 0th stair by taking only 1 or 2 steps at a time. A way is unique when no permutation of it is counted beside itself.

For eg: n = 4, number of unique ways = 3

{1,1,1,1}

{1,1,2}, {1,2,1}, {2,1,1} these were counted as 1 unique way as others are permutation.

{2,2}

Question 3:- Given a array of racers of length n, where arr[i] represents the racer who finished the race just before the ith racer. The racer who came first in the race has it’s value as -1. There are no duplicates in the array. Find the finishing order of racers.

For eg: Input :- [4,3,-1,2]

Output :- [3,2,4,1]

This has to be done in O(n) time.

After this the interviewer asked if i had any questions for him. I asked about what was expected out of a summer intern. This interview lasted about 45 minutes which was quite less as compared to others who had their interviews lasted for about 75–90 minutes.

Out of 31 students, 7 were finally offered the summer internship including me.

My advice would be:

  • Give each part of online round the same importance. You never know which part may shortlist you for the interview.
  • Have strong problem solving skills.
  • Speak whatever you are thinking while solving a question during interview. Whatever approach you are trying to take, try to explain to interviewer why you took this approach and always keep in mind the edge cases for the question.
  • Practice as many DSA questions as you can. (I did my practice on binarysearch instead of leetcode. It is more user friendly and has many company-wise sorted questions. You can also compete with your friends by creating a room in this site).
  • Do revise your CS fundamentals like OS, DBMS, CN and OOPS.

--

--

Sanskar Garg

Incoming SDE Summer Intern @Amazon, Competitive Programmer in C++, Pre-Final Year Student