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

SDE - 1

Amazon
upvote
share-icon
5 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Leadership Principles
Tip
Tip

Tip 1 : You can checkout the top Amazon questions on leetcode
Tip 2 : Go through the Amazon's Leadership principles very thoroughly
Tip 3 : Have your basics strong in DS, OOPs and Computer Engineering Subjects

Application process
Where: Referral
Resume Tip
Resume tip

Tip 1 : Keep the resume concise and short.
Tip 2 : Use concise sentence for the description of your projects/experiences so that they specify what you did in as less words as you can.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration70 minutes
Interview date15 Dec 2021
Coding problem2

Got two coding questions and two general question where you have to explain the approach for the coding questions you solved.

1. Fire in the cells

Hard
15m average time
85% success
0/120
Asked in companies
AmazonVMware Inc

You are given a matrix 'MAT' of size ‘N’ * ‘M’, where ‘N’ is the number of rows and ‘M’ is the number of columns. Value ‘0’ in a cell represents that the cell is set on fire initially, (at time t = ‘0’), and the cells which don’t have fire initially have value = ‘1’, and are called safe cells.

If a cell is on fire, then in one second the fire will expand to its adjacent cells (left, right, top, bottom) if they are not already on fire.

You are given the position of a person as integers ‘X’ and ‘Y’ denoting the cell (‘X’, ‘Y’). In one second the person can move from its current cell to any one of its adjacent cells, provided they are not on fire.

You have to determine if the person can move through the matrix to one of the escape cells without burning himself i.e. without going through the fire cells. If it’s possible, return time taken, else return -1.

Note:

1. Escape cells in this problem are all such cells that lie on the edge of the matrix but not on the corner. i.e all such cells which are in the first row, first column, last row, and last column excluding the four corner cells are considered as valid escape cells.

2. A cell once set on fire continues to remain on fire till the end.

3. Note that rows are indexed from 0 to ‘N’ - 1 and columns are indexed from 0 to ‘M’ - 1.

4. The escape cells may also be initially on fire or can catch fire from some neighboring cell.
Try solving now

2. Optimize Memory Usage

Moderate
0/80
Asked in companies
ArcesiumAmazonSamsung

Alex has a computer with ‘K’ memory spaces. He has a list of ‘N’ different document downloads that he would like to do, each of which consumes some unique memory usage. He also has ‘M’ computer games, each of which consumes some unique memory usage. His computer can allow at most one download and at most one game to run simultaneously, provided that the sum of memory usages doesn’t exceed ‘K’. Alex wants to play at most one game and complete at most one download so that the total memory usage is maximum.

Given a list ‘download’ and a list ‘game’, help Alex find out the number of pairs of downloads and games such that the sum of memory usages is maximum. It can also be possible that Alex only plays a game or performs a download at a time.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date29 Dec 2021
Coding problem2

This round consisted of 2 coding problems. Started with my introduction and the work I did in my previous organisation

1. Swap Nodes in Pairs

Moderate
40m average time
60% success
0/80
Asked in companies
Dell TechnologiesWalmartOLX Group

You are given a singly linked list of integers.

Your task is to swap every two adjacent nodes, and return the head of the modified, linked list.

For Example:

We have a linked list 1->2->3->4->5->6->7 and so on. You are supposed to swap pairs of a linked list like swap (1,2), (3,4), (5,6), and so on.
Note:
1. You may not modify the data in the list’s nodes; only nodes themselves may be changed. Because imagine a case where a node contains many fields, so there will be too much unnecessary swap.

2. If a pair of a node does not exist, then leave the node as it is.
Try solving now

2. Bottom View Of Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
OYOMicrosoftAmazon

You are given a 'Binary Tree'.


Return the bottom view of the binary tree.


Note :
1. A node will be in the bottom-view if it is the bottom-most node at its horizontal distance from the root. 

2. The horizontal distance of the root from itself is 0. The horizontal distance of the right child of the root node is 1 and the horizontal distance of the left child of the root node is -1. 

3. The horizontal distance of node 'n' from root = horizontal distance of its parent from root + 1, if node 'n' is the right child of its parent.

4. The horizontal distance of node 'n' from root = horizontal distance of its parent from the root - 1, if node 'n' is the left child of its parent.

5. If more than one node is at the same horizontal distance and is the bottom-most node for that horizontal distance, including the one which is more towards the right.


Example:
Input: Consider the given Binary Tree:

alt text

Output: 4 2 6 3 7

Explanation:
Below is the bottom view of the binary tree.

alt text

1 is the root node, so its horizontal distance = 0.
Since 2 lies to the left of 0, its horizontal distance = 0-1= -1
3 lies to the right of 0, its horizontal distance = 0+1 = 1
Similarly, horizontal distance of 4 = Horizontal distance of 2 - 1= -1-1=-2
Horizontal distance of 5 = Horizontal distance of 2 + 1=  -1+1 = 0
Horizontal distance of 6 = 1-1 =0
Horizontal distance of 7 = 1+1 = 2

The bottom-most node at a horizontal distance of -2 is 4.
The bottom-most node at a horizontal distance of -1 is 2.
The bottom-most node at a horizontal distance of 0 is 5 and 6. However, 6 is more towards the right, so 6 is included.
The bottom-most node at a horizontal distance of 1 is 3.
The bottom-most node at a horizontal distance of 2 is 7.

Hence, the bottom view would be 4 2 6 3 7


Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date4 Jan 2022
Coding problem2

Again, 2 coding questions. The result of first two rounds is accumulated and if passed, then moved on to the next rounds

1. Check If Given Words Are Present In A String

Hard
35m average time
60% success
0/120
Asked in companies
QuikrMicrosoftAmazon

Given a string 'S' and a list 'wordList' that consists of 'N' distinct words. Let 'Wi' denote word at index 'i' in 'wordList'. For each word 'Wi' in 'wordList', you need to determine whether it is present in string 'S' or not. Return a boolean array, where a boolean value at index ‘i’ represents whether the word ‘Wi’ is present in the string ‘S’ or not.

Try solving now

2. Kth factor of a number

Moderate
10m average time
90% success
0/80
Asked in companies
AmazonDeloitte

You are given two positive integers ‘N’ and ‘K’. You have to find the ‘K’-th factor of ‘N’, where the ‘K’-th factor is the ‘K’-th number in a sequence of all the factors of ‘N’ arranged in ascending order.

For example:

If N = 12 and K = 5, then we have to find the 5’th factor of 12 out of the list of all factors of 12 : [1, 2, 3, 4, 6, 12], the 5’th factor in the list is 6. Hence, the output is 6.
Problem approach

I did the initial solving but the interviewer altered the question a little bit to trick me, which I got tricked. Was not able to code the solution to this altered question but was recommended for further rounds

Try solving now
04
Round
Medium
Video Call
Duration60 minutes
Interview date27 Jan 2022
Coding problem2

This round is supposed to be the managerial plus technical round. Since I was applying to the SDE-1 position, I was not bombarded with the questions related to the Leadership principles much except for 2-3 scenarios.

1. Operating System

  • What is RAID structure in OS? What are the different levels of RAID configuration?
  • Explain demand paging?
  • What do you mean by process synchronization?
Problem approach

Tip 1 : Prepare your Computer Engineering subjects as well.
Tip 2 : OS and DBMS are the subjects that they most stress on.

2. DBMS

  • What is data abstraction in DBMS?
  • What is normalization?
  • What are the integrity rules in DBMS?
  • What are Acid Properties?
Problem approach

Tip 1 : Prepare your Computer Engineering subjects as well.
Tip 2 : OS and DBMS are the subjects that they most stress on.

05
Round
Easy
Video Call
Duration60 minutes
Interview date3 Feb 2022
Coding problem2

One normal coding question related to linked list and then most of the interview was on the work that I did in my previous organization.

1. Reverse A LL

Moderate
30m average time
65% success
0/80
Asked in companies
CIS - Cyber InfrastructureAmazonPhonePe

Ninjas is practicing problems on the linked list. He came across a problem in which he has given a linked list of ‘N’ nodes and two integers, ‘LOW’ and ‘HIGH’. He has to return the linked list ‘HEAD’ after reversing the nodes between ‘LOW’ and ‘HIGH’, including the nodes at positions ‘LOW’ and ‘HIGH’.

Try solving now

2. System Design

Was mostly discussing on the projects that I did. With some alteration to them as I could not exactly tell what the flow of the project was. So the interviewer introduced to me the scenarios in the project and told me how the system would look like then.

Problem approach

Tip 1 : Be very aware of the projects you did.
Tip 2 : Clearly tell of the things that you did do and those you did not.
Tip 3 : Communicate effectively. Discuss everything that you do while constructing your solution.

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
3085 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2295 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
1593 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
58238 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
12649 views
2 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Microsoft
5984 views
5 comments
0 upvotes