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

SDE - 1

Amazon
upvote
share-icon
5 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures (less focus on Dynamic Programming),Algorithms,Java,System Design (High-Level Restful Micro-services Design),OOPs
Tip
Tip

Tip 1 : Practice coding regularly instead of doing it a lot on some days and nothing on some days. 
Tip 2 : Previous interview experiences are very valuable. 
Tip 3 : Medium level questions are underrated. Don't skip those and only practice Hard questions.

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

Tip 1 : If you have experience, try to highlight your contributions to whatever projects you worked on, instead of writing a general description of the project. Descriptions with quantifiable achievements are even better.
Tip 2 : If you don't have experience, your projects will be your selling point. Try to make projects which allow you to learn different technologies. If you can make something different than the regular Hotel Management System or Chat Bot everybody makes, it will help you stand out.
Tip 3 : Don't include unnecessary information just to expand your resume. Include what you know and have done and have some confidence in. Ex - Don't put Python in Skills because you can write a loop in python. Don't put Hobbies or Languages in if it's making your resume go longer than 1 page.

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 minutes
Interview date1 Aug 2021
Coding problem1

2 questions to be done in 90 minutes.
Was given a week to complete the test.
Both questions were straight forward.
Also had to explain the approach (and mention Time and Space complexities) in text format.

1. Shortest path in an unweighted graph

Moderate
25m average time
70% success
0/80
Asked in companies
AmazonMicrosoftGoldman Sachs

The city of Ninjaland is analogous to the unweighted graph. The city has ‘N’ houses numbered from 1 to ‘N’ respectively and are connected by M bidirectional roads. If a road is connecting two houses ‘X’ and ‘Y’ which means you can go from ‘X’ to ‘Y’ or ‘Y’ to ‘X’. It is guaranteed that you can reach any house from any other house via some combination of roads. Two houses are directly connected by at max one road.

A path between house ‘S’ to house ‘T’ is defined as a sequence of vertices from ‘S’ to ‘T’. Where starting house is ‘S’ and the ending house is ‘T’ and there is a road connecting two consecutive houses. Basically, the path looks like this: (S , h1 , h2 , h3 , ... T). you have to find the shortest path from ‘S’ to ‘T’.

For example
In the below map of Ninjaland let say you want to go from S=1 to T=8, the shortest path is (1, 3, 8). You can also go from S=1 to T=8  via (1, 2, 5, 8)  or (1, 4, 6, 7, 8) but these paths are not shortest.

altImage

Problem approach

I used Djikstra's Shortest path Algorithm to solve it.

Try solving now
02
Round
Medium
Video Call
Duration60 mins
Interview date23 Aug 2021
Coding problem2

Video Call interview with 2 coding questions and 1 leadership principle based question.

1. Kth Largest Element In A Stream

Moderate
30m average time
65% success
0/80
Asked in companies
Wells FargoGoldman SachsPhonePe

You will be given a stream of numbers, and you need to find the 'kth' largest number in the stream at any given time.


As the stream of numbers can not be given during compile time, so you need to design a data structure which can accept infinite numbers and can return the 'kth' largest number at any given time.


The stream of numbers is nothing but a large collection of numbers from which integers are read at runtime, such as the user will never know the upper limit on the number of integers that will be read.


The implemented data structure must support the following operations:

1. add(DATA) :
   This function should take one argument of type and store it in its pool and returns the 'kth' largest number from the current pool of integers.

You will be given 'q' queries:

val - For this query, insert the integer into your current pool of integers and return the 'kth' largest integer from the existing pool of integers.
Note
 1. The maximum number of integers that will be given will always be under memory limits.

 2. You will also be given an initial pool of integers whose size equals k.

 3. The maximum number of queries will be less than 10^5.

 4. The 'kth' largest element is not the 'kth' distinct element but the 'kth' largest element in the sorted order.

 5. There will be at least one query of type 2.
Problem approach

We will create a max-heap of K size.
As elements come in from the stream we add it to the heap if it's smaller than root and heapify.
The root always gives us the Kth highest element.

Try solving now

2. Split the String

Easy
0/40
Asked in companies
Morgan StanleyLinkedInAmazon

You are given a string ‘str’ of ‘N’ lowercase alphabets. Your task is to check whether it is possible to split the given string into three non-empty substrings such that one of them is a substring of another two.

For example:

‘str’ = 'abcabab', we can split this string into 3 string a, b, c as a = 'abc', b = 'ab',  c = 'abc', we can clearly see that b is a substring of both a and c.

Note:

A substring is a contiguous sequence of characters within a string. For example 'ab', 'b' and 'abc' are the substring of string 'abc', but 'ac' is not a substring of 'abc'. 

A non-empty substring means a substring with a size greater than 0.
Problem approach

I used Trie for this.
Implemented a recursive approach.
She asked how we could optimize it. 
I suggested memoization. Also discussed Bottom Up DP solution but wasn't asked to code it.

Try solving now
03
Round
Medium
Video Call
Duration60 mins
Interview date24 May 2022
Coding problem2

2 coding questions. 60 minutes. 1 leadership principle question.

1. Connecting Cities With Minimum Cost

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

There are ‘N’ cities numbered from 1 to ‘N’ and ‘M’ roads. Each road connectss two different cities and described as a two-way road using three integers (‘U’, ‘V’, ‘W’) which represents the cost ‘W’ to connect city ‘U’ and city ‘V’ together.

Now, you are supposed to find the minimum cost so that for every pair of cities, there exists a path of connections (possibly of length 1) that connects those two cities together. The cost is the sum of the connection costs used. If the task is impossible, return -1.

Try solving now

2. Balanced parentheses

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

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Problem approach

I gave a stack based approach, which wasn't 100% correct.
The interviewer gave me a hint and I was able to correct the solution.

Try solving now
04
Round
Easy
Face to Face
Duration60 mins
Interview date24 Aug 2021
Coding problem1

Managerial round to disucss experience, projects, leadership principles etc.

1. Project based questions

Explain the project I was working on in my previous company. Cross questions about the tech used, architecture, how it was used, what challenged we faced, what solutions we implemented, my role in the projects etc.

Problem approach

Tip 1 : Be honest. It's okay to exaggerate a bit but don't do it too much so that you find yourself in a cross-questioning hole you can't get out of.
Tip 2 : Prepare about your projects and past experience before hand. Be ready to answer `why` on every aspect of the project.

05
Round
Medium
Video Call
Duration60
Interview date10 Sep 2021
Coding problem2

2 coding questions. 1 leadership principle question.

1. Find Conflicting Meetings

Easy
15m average time
85% success
0/40
Asked in companies
AmazonRazorpayWalmart

Mr. X is a busy person. He has to attend 'N' meetings throughout the day. You are given the schedule of Mr. X in a 2D Matrix 'MEETINGS' having 'N' rows and 2 columns. The 'i'th element of the first column contains the starting time of the 'i'th meeting, and the 'i'th element of the second column contains the ending time of the 'i'th meeting.

Two meetings are conflicting with each other if they overlap each other for some non-zero time. If a meeting 'X' starts at the same time as the meeting 'Y' ends, then they do not conflict.

Given the schedule of the day of Mr. X. Find the index of any one conflicting meeting for each of the 'N' meetings.

In case a particular meeting does not conflict with any meeting, take -1 as the index of the conflicting meeting for that meeting.

Note :

If there are multiple conflicting meetings for a particular meeting. You can return any one of them.

Example :

Consider the matrix MEETINGS = [ [ 1, 3 ] , [ 4, 5 ] , [ 2, 5 ] ] 

The array containing the Conflicting Meetings will be [ 3, 3, 1 ].
Try solving now

2. Course Schedule

Easy
15m average time
85% success
0/40
Asked in companies
UberAppleDunzo

You are a student of Netaji Subhas Institute of Technology. You have to take ‘N’ number of courses labelled from 1 to N to complete your B.Tech Degree.

Some courses may have prerequisites, for example, to take course 1 you have to first take course 2, which is expressed as a pair: [1, 2]. Now, your task is to find is it possible for you to finish all courses.

Note: There are no duplicate pairs in the prerequisites array.

For example-
If N = 2 and prerequisite = [[1, 2]]. Then, there are a total of 2 courses you need to take. To take course 1 you need to finish course 2. So, it is possible to complete all courses. 
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 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
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
5983 views
5 comments
0 upvotes