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

SDE - 2

Amazon
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 months
Topics: Data Structures, System Design, Algorithms, Trees, Graphs
Tip
Tip

Tip 1 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 2 : Deep understanding of Amazon Leadership principles is a must.
 

Application process
Where: Other
Eligibility: Above 2 years of experience
Resume Tip
Resume tip

Tip 1 : Resume should be short and concise
Tip 2 : Add side projects and learnings

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 minutes
Interview date3 Mar 2022
Coding problem2

Timing - Flexible, you can take up at any time
Environment was pretty good as it was on HackerRank

1. LCA Of Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
GrabDisney + HotstarShareChat

You have been given a Binary Tree of distinct integers and two nodes ‘X’ and ‘Y’. You are supposed to return the LCA (Lowest Common Ancestor) of ‘X’ and ‘Y’.


The LCA of ‘X’ and ‘Y’ in the binary tree is the shared ancestor of ‘X’ and ‘Y’ that is located farthest from the root.


Note :
You may assume that given ‘X’ and ‘Y’ definitely exist in the given binary tree.
For example :
For the given binary tree

Example

LCA of ‘X’ and ‘Y’ is highlighted in yellow colour.
Problem approach

The idea is to traverse the tree starting from the root. If any of the given keys (n1 and n2) matches with the root, then the root is LCA (assuming that both keys are present). If the root doesn’t match with any of the keys, we recur for the left and right subtree. The node which has one key present in its left subtree and the other key present in the right subtree is the LCA. If both keys lie in the left subtree, then the left subtree has LCA also, otherwise, LCA lies in the right subtree.

Try solving now

2. Find Number Of Islands

Moderate
34m average time
60% success
0/80
Asked in companies
WalmartShareChatAmazon

You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.

A cell is said to be connected to another cell, if one cell lies immediately next to the other cell, in any of the eight directions (two vertical, two horizontal, and four diagonals).

A group of connected cells having value 1 is called an island. Your task is to find the number of such islands present in the matrix.

Problem approach

A cell in 2D matrix can be connected to 8 neighbours. So, unlike standard DFS(), where we recursively call for all adjacent vertices, here we can recursively call for 8 neighbours only. We keep track of the visited 1s so that they are not visited again.

Try solving now
02
Round
Hard
Video Call
Duration60 minutes
Interview date16 Mar 2022
Coding problem1

One coding question related to Binary Trees. I found it to be a bit on the harder side.

Timing - 12:00 PM

1. Find the number of possible ways in a Binary Tree to make the sum of nodes (in a particular path) exactly equal to ‘K’.

Hard
50m average time
50% success
0/120
Asked in companies
AmazonCodenation

You have been given a labelled binary tree having integer value (except zero) corresponding to all its nodes. You have to find the number of possible ways to make the sum of nodes (in a particular path) exactly equal to ‘k’.

Note:
i) Nodes considered for the sum should be from parent to child.
ii) For a particular way, you can only consider nodes having the common path.
iii) Two ways are different from each other if they have an unequal number of nodes (for making sum equal to k) or at least one node is different between both the ways.
For example :

Example

For the binary tree shown in the figure, the possible ways/paths are [8, 6, -4], [6, -3, 7], and [1, 9] for a sum of nodes equal to 10.
Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date18 Mar 2022
Coding problem1

System Design round

Timing : Afternoon 5:00 PM

1. System Design Question

Design a vending machine backend and handle the different payment methods like Cash, Card, UPI, etc.

Problem approach

Tip 1 : Practice System Design thoroughly. 
Tip 2 : DB design is a must

Tip 3 : You can follow the System Design guided path on CodeStudio along with Gaurav Sen's videos. It's indeed a great resource.
 

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 - 2
5 rounds | 8 problems
Interviewed by Amazon
1864 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Amazon
2238 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 8 problems
Interviewed by Amazon
3374 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Amazon
910 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29891 views
8 comments
0 upvotes
company logo
SDE - 2
4 rounds | 7 problems
Interviewed by Dunzo
3163 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Samsung
2587 views
0 comments
0 upvotes