Amazon interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Amazon
upvote
share-icon
5 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
Prior to seeking this position, I was employed as a software developer at Aptean, where I had the opportunity to tackle stimulating challenges. I possess a logical mindset and take pleasure in resolving real-world issues. In my third year of college, I began delving into data structures and algorithms and continued to prioritize them alongside my initial job.
Application story
I proactively sought a career change and registered my profile on job portals such as Instahire and Naukri. Moreover, I remained highly engaged on LinkedIn. In the case of Amazon, I was referred by one of Amazon's employees with whom I connected through LinkedIn.
Why selected/rejected for the role?
- Strong DSA and computer science fundamentals - Consistency - Explanation in the interview how my strengths and previous experience align with the company's requirement
Preparation
Duration: 6 months
Topics: Data Structure and Algorithms, Problem solving, Computer Science fundamentals, Operating system, DBMSCompany specific behavioural questions
Tip
Tip

Tip 1: Rehearse former interview questions from online platforms.
Tip 2: Try to solve at least one problem daily.
Tip 3: Be consistent.
Tip 4: Be confident during the interview.
Tip 5: Don't underestimate the behavior-related questions for Amazon. Prepare at least one story for each of their leadership principles.

Application process
Where: Referral
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1: One Page Resume
Tip 2: Precise and to the point

Interview rounds

01
Round
Easy
Online Coding Test
Duration120 minutes
Interview date7 Feb 2021
Coding problem1

I received the OA link in my email four days ago and blocked my calendar for two hours on February 7th. The interview was very easy and straightforward. It primarily consisted of three sections:

  1. Coding challenge and explanation of the algorithm
  2. Work style survey
  3. Feedback survey

1. Check Permutation

Easy
15m average time
85% success
0/40
Asked in companies
AmazonGoldman SachsCIS - Cyber Infrastructure

You have been given two strings 'STR1' and 'STR2'. You have to check whether the two strings are anagram to each other or not.

Note:
Two strings are said to be anagram if they contain the same characters, irrespective of the order of the characters.
Example :
If 'STR1' = “listen” and 'STR2' = “silent” then the output will be 1.

Both the strings contain the same set of characters.
Problem approach

I applied a brute force solution, and all the test cases passed.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date25 May 2021
Coding problem2

It was purely a coding round. The interviewer was an SDE-2. I was supposed to solve two questions in 50 minutes. The overall level of the interview was easy to medium.

1. Reverse Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
WalmartHCL TechnologiesInfo Edge India (Naukri.com)

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

Initially, I proposed the approach of storing the nodes in a stack and then popping them out and appending them one by one, which was taking O(N) time and space as well. The interviewer further asked me if there could be any optimization possible. Then I came up with the iterative approach to reverse the list in place, which takes O(1) space.

Try solving now

2. Left View Of Binary Tree

Moderate
30m average time
60% success
0/80
Asked in companies
WalmartSalesforceDelhivery

You have been given a Binary Tree of 'n' nodes, where the nodes have integer values



Example :
If the input tree is as depicted in the picture: 

alt text

The Left View of the tree will be:  2 35 2 
Problem approach

I proposed two solutions using recursion and level order traversal. The interviewer asked me to implement it using level order traversal, which I did using a queue. Then we discussed the overall time and space complexity.

Try solving now
03
Round
Hard
Video Call
Duration60 minutes
Interview date25 May 2021
Coding problem1

This round was also conducted on the same day. For the first 5 minutes, we introduced ourselves and explained the work we are currently doing. Then he explained the pattern of the interview, for which I had to solve one hard question followed by a 15-minute discussion on LPs. The interviewer was very helpful and provided hints if absolutely needed. Overall, the experience was good.

1. Get DFS Path

Easy
15m average time
90% success
0/40
Asked in companies
FacebookSprinklrOptum

You are given an undirected graph G(V, E), where ‘V’ is the number of vertices and ‘E’ is the number of edges present in the graph and two integers ‘v1’ and ‘v2’ denoting vertices of the graph, find and print the path from ‘v1’ to ‘v2’ (if exists) in reverse order. Print an empty list if there is no path between ‘v1’ and ‘v2’.

Find the path using DFS and print the first path that you encountered.

Note:
Vertices are numbered through 0 to V-1.
Problem approach

I asked a lot of questions to clarify the problem statement. Then, I explained the approach to solve it using DFS. The interviewer asked about the time complexity and how to optimize the approach. After looking in detail, I found that we can store intermediate results somewhere instead of calculating them again. I then modified the approach based on DP + DFS and discussed the time complexity.

Try solving now
04
Round
Medium
Video Call
Duration60 minutes
Interview date27 May 2021
Coding problem2

This round was taken by one of their senior managers, but the pattern was similar to the last round. For the initial 15 minutes, we discussed the current work and went over my resume. He also asked two LP questions, which I answered based on the STAR pattern. For 40 minutes, he asked two medium problems to solve, and the last 5 minutes were reserved for any questions.

1. Largest Island

Moderate
30m average time
90% success
0/80
Asked in companies
IBMAmazonChegg Inc.

You are given two integers 'n' and 'm', the dimensions of a grid. The coordinates are from (0, 0) to (n - 1, m - 1).


The grid can only have values 0 and 1.


The value is 0 if there is water and 1 if there is land.


An island is a group of ‘1’s such that every ‘1’ has at least another ‘1’ sharing a common edge.


You are given an array 'queries' of size 'q'.


Each element in 'queries' contains two integers 'x' and 'y', referring to the coordinates in the grid.


Initially, the grid is filled with 0, which means only water and no land.


At each query, the value of 'grid' at (x, y) becomes 1, which means it becomes land.


Find out, after each query, the number of islands in the grid.


Example :
Input: 'n' = 3, 'm' = 4
'queries' = [[1, 1], [1, 2], [2, 3]]

Output: [1, 1, 2]

Explanation:

Initially, the grid was:
0 0 0 0
0 0 0 0
0 0 0 0

After query (1, 1):
0 0 0 0
0 1 0 0
0 0 0 0
There is one island having land (1, 1).

After query (1, 2):
0 0 0 0
0 1 1 0
0 0 0 0
Since (1, 1) and (1, 2) share a common edge, they form one island. So there is one island having lands (1, 1) and (1, 2).

After query (2, 3):
0 0 0 0
0 1 1 0
0 0 0 1
Now there are two islands, one having lands (1, 1) and (1, 2), and another having land (2, 3).

So the number of islands after each query is [1, 1, 2].
Problem approach

We discussed the approach first and then jumped to the solution. Approach:

  • Iterate through each cell in the grid, and for each 1 encountered, perform DFS to find the connected land cells and calculate the area.
  • Mark visited cells as 0 and recursively explore the four neighboring cells.
  • Keep track of the maximum area found during the DFS.
  • Return the maximum area of an island found.
Try solving now

2. Maximum In Sliding Windows Of Size K

Moderate
20m average time
80% success
0/80
Asked in companies
AppleWalmartOYO

Given an array/list of integers of length ‘N’, there is a sliding window of size ‘K’ which moves from the beginning of the array, to the very end. You can only see the ‘K’ numbers in a particular window at a time. For each of the 'N'-'K'+1 different windows thus formed, you are supposed to return the maximum element in each of them, from the given array/list.

Problem approach

I presented the naive approach, and then he told me to optimize it. I tried and suggested a few methods, but I was missing some edge cases. I kept thinking aloud but was unable to provide an optimized solution. They mentioned that we had passed 45 minutes of the interview, so let’s just discuss the high-level approach.

Try solving now
05
Round
Medium
Video Call
Duration60 minutes
Interview date27 May 2021
Coding problem1

This was a bar raiser round. The interviewer that I got for this round was not quite friendly and helpful. They just focused on Leadership Principles, asking multiple LP questions and digging into detail on each of my answers with follow-up questions. A few questions I remember are:

  • Tell me about a time when you had to learn something new to deliver to the client.
  • Tell me about something you have done at the production level.

I provided my answers using the STAR method and Amazon Leadership Principles.

Then, there was an LLD problem, and we discussed the high-level approach.

1. Design Question

Design the Alexa charge connection and battery details to be rendered on different devices using both audio and textual displays.

Problem approach

I provided the solution following the SOLID principles; there were many back-and-forth discussions.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
3084 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2294 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
1592 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8962 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
12648 views
2 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Microsoft
5983 views
5 comments
0 upvotes