Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Amazon interview experience Real time questions & tips from candidates to crack your interview

SDE - 2

Amazon
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures and Algorithms, OOPS concepts, cpp, operating systems, dbms
Tip
Tip

Tip 1 : Expect questions related to Amazon Leadership principles in all rounds, so go through those thoroughly before sitting for the interview process.
Tip 2 : In the design rounds, interviewer doesn’t expect the most ideal answer from you and unless your choice of technology is outrageously wrong, he won’t pinpoint that.
Tip 3 : Data Structures questions are a must in all rounds, so try to master them thoroughly

Application process
Where: Campus
Eligibility: No CGPA criteria
Resume Tip
Resume tip

Tip 1 : Make sure you know everything you mention in your resume
Tip 2 : Have some hands on with hackathons and contests ,which brings an added value to your resume

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date2 Oct 2020
Coding problem2

I got a call from an Amazon recruiter regarding the schedule of the test . 

She sent me the coding test link which I had to complete within a week. we can attempt the online test anytime, when we have time for a period of 90 minutes at a stretch. 

Once I completed the test, I got a call to schedule the interviews in two weeks.

1. Shopping Options

Easy
0/40
Asked in companies
Media.netBNY MellonAmazon

You are given the list of costs of pants in an array “pants”, shirts in an array “shirts”, shoes in an array “shoes”, and skirts in an array “skirts”. You are also given a budget amount ‘X’ to spend. You want to buy exactly 1 item from each list. Your task is to determine the total number of possible combinations that you can buy, given that the total amount of your purchase does not exceed your budget amount.

Try solving now

2. Max Submatrix

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

Ninja has been given a matrix ‘MAT’ of integers having size ‘N’ x ‘M’ i.e. N rows and M columns. Ninja has to find the maximum sum submatrix in it. In other words, he has to find the maximum sum over all submatrices in the matrix.

For example: For the ‘MAT’ given below, the maximum sum submatrix having a sum of 29 is highlighted in red.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date16 Oct 2020
Coding problem2

Virtual interview occured in amazon chime.The interviewer gave his introduction, asked me a bit on the kind of projects I’ve worked on. Then he started with a data structure problem.

1. Clone a binary tree with random pointers.

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

You are given a binary tree. Apart from the left and right child pointers, each node in the given binary tree points to a random node in the given binary tree. You are supposed to return a clone of the binary tree.

Cloning a binary tree means making a deep copy of the input binary tree.

Note :
Two nodes may have the same value associated with them.
The root node will be fixed and will be provided in the function.
Try solving now

2. Ninja Port

Hard
0/120
Asked in company
Amazon

Ninja is stuck in a city with ‘N’ colonies, and each colony contains ‘K’ houses. Ninja is currently at the house number “sourceHouse” present in the colony with colony number “sourceColony”. He wants to get to the house with house number “destinationHouse” present in the colony with colony number “destinationColony” as fast as possible.

Since Ninja is a Ninja, he also has a special power by which he can teleport from one house to another within the same colony in 1 second. Also, Ninja can travel from the Kth house of the Mth colony to the 1st house of the (M + 1)th colony and also vice versa in the same time.

Additionally, some houses have secret underground paths to other houses, using which Ninja can travel among houses using this path which also takes 1 second.

You are given a list “secretPaths”, each element of this list contains 4 integers. The first two are for the source house of the path “secretSourceHouse” and “secretSourceColony” denoting the source house number and source colony number respectively. The next 2 integers are for the destination house of the path “secretDestinationHouse” and “secretDestinationColony” denoting the destination house number and destination colony number respectively.

Since the underground paths are secret and having too many paths in the same colony could lead the Ninja community getting caught, there are at most ‘P’ underground paths in each colony (which includes incoming and outgoing underground paths).

Note:
The secret underground paths cannot be used to travel both ways, you can’t travel from destination to source.
Try solving now
03
Round
Easy
Video Call
Duration75 Minutes
Interview date17 Oct 2020
Coding problem1

This was taken by an engineering manager who asked me regarding my projects for around 10-15 mins and then we moved to a system design problem. He asked me to design Slack messenger.
I started by listing the functional and non-functional requirements(on which he questioned me a bit), then I moved to draw the high-level architecture. The components which I drew were the clients, gateway service(LB + authentication, etc), Messaging Service, User Service, Web Socket Manager service, Fan Out service(I added this for the group messages thing, but he didn’t interrogate much on that).

He asked me what would be the schema of my messages table and the scenarios in which the recipient user is online/offline.Also asked about the partitioning key and primary key of the 2-3 tables which I had made

1. Technical Questions

This was taken by an SDE III guy, who again asked me about my projects for like 10 mins and then moved on to a low level design question.He asked me to design the HackerRank platform.
Again I started with listing down the usecases which I would cover, the interviewer asked me to write all the APIs which I would need to expose.

04
Round
Hard
Video Call
Duration60 minutes
Interview date20 Oct 2020
Coding problem2

Bar Raiser Round

This was again taken by an engineering manager who discussed my projects in depth for around 20-25 mins. In the remaining time he asked me 2 DSA questions. (Yes I too was surprised that he didn’t ask anything regarding design).

In almost all the rounds, I was asked questions related to Amazon Leadership principles, so do make sure you go through those before sitting for the interview process. 

You can refer to this link(https://www.codingninjas.com/codestudio/problem-lists/top-amazon-coding-interview-questions) for practicing the same, I found it useful. 
In the design rounds, interviewer doesn’t expect the most ideal answer from you and unless your choice of technology is outrageously wrong, he won’t pinpoint that.

1. Group Anagrams Together

Moderate
0/80
Asked in companies
DunzoAdobeOptum

You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another.

Note :
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase. We can generalize this in string processing by saying that an anagram of a string is another string with the same quantity of each character in it, in any order.
Example:
{ “abc”, “ged”, “dge”, “bac” } 
In the above example the array should be divided into 2 groups. The first group consists of { “abc”, “bac” } and the second group consists of { “ged”, “dge” }.
Try solving now

2. Add Linked Lists

Easy
20m average time
80% success
0/40
Asked in companies
Morgan StanleyQualcommIntuit

Given two numbers represented by linked lists. Your task is find the sum list and return the head of the sum list.

The sum list is a linked list representation of addition of two numbers.

Try solving now

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 write a single-line comment in C++?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Amazon
1477 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Amazon
948 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 8 problems
Interviewed by Amazon
1895 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Amazon
463 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
23091 views
8 comments
0 upvotes
company logo
SDE - 2
4 rounds | 7 problems
Interviewed by Dunzo
2362 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Samsung
1992 views
0 comments
0 upvotes