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

SDE - 1

Amazon
upvote
share-icon
4 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data structures and algorithms, Operating system, DMBS, Object-oriented programming, Behavioural questions
Tip
Tip

Tip 1 : practice variety of questions and cover all the data structures and major algorithms
Tip 2 : Be clear fundamentals of computer science concepts.

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

Tip 1 : Keep it one page and mention only important points
Tip 2 : Include internship experience or project work

Interview rounds

01
Round
Hard
Online Coding Interview
Duration120 Minutes
Interview date20 Nov 2021
Coding problem1

1. Count Ways

Easy
24m average time
81% success
0/40
Asked in companies
FacebookGoldman SachsAmazon

You have been given a directed graph of 'V' vertices and 'E' edges.

Your task is to count the total number of ways to reach different nodes in the graph from the given source node ‘S’. A way is called as different from others if the destination node or used edges differ.

As the total number of such ways can be large, print the total ways modulo 10 ^ 9 + 7.

Note:

1. Include the source node as a destination also.
2. There are no cycles in the given graph.
Try solving now
02
Round
Medium
Video Call
Duration60 Minutes
Interview date14 Jan 2022
Coding problem2

1. PAINT THE FENCE

Easy
20m average time
80% success
0/40
Asked in companies
AmazonOlaVFISLK Global Services

You have a long fence in your backyard. The fence consists of 'N' sections, each of them made from a different material.

The fence is not painted yet, so you decide to hire 'Q' painters to paint it. The i-th painter will paint all the sections lying in the section range [Li, Ri].

Unfortunately, you are on a tight budget, so you decided to hire only 'Q' - 2 painters. Now, you want to maximise the number of painted sections in your fence, so you have to choose those 'Q' - 2 painters optimally.

Note:
A section is considered painted if at least one painter paints it.
Try solving now

2. Walls And Gates

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

You are given a matrix having ‘N’ rows and ‘M’ columns. Each cell of the matrix can only contain three values as given below:

-1 -> It denotes a wall or an obstacle

0  -> It denotes a gate

2^31 - 1 =  2147483647 ( INF ) -> An infinitely large value  denotes the empty room.

For each empty room (denoted by INF), you have to refill it with the distance to its nearest gate. If none of the gates is reachable from an empty room then the value ‘INF’ will remain as it is.
Example
For the matrix [[0,-1],[0,2147483647]] the updated matrix will be [[0,-1],[0,1]].
Note
The distance between two cells having their coordinates (x1,y1) and (x2,y2) are abs(x2-x1) + abs(y2-y1).
Try solving now
03
Round
Easy
Video Call
Duration60 Minutes
Interview date24 Jan 2022
Coding problem1

1. Word Break

Moderate
15m average time
85% success
0/80
Asked in companies
Morgan StanleyMakeMyTripIBM

You are given a list of “N” strings A. Your task is to check whether you can form a given target string using a combination of one or more strings of A.

Note :
You can use any string of A multiple times.
Examples :
A =[“coding”, ”ninjas”, “is”, “awesome”]  target = “codingninjas”
Ans = true as we use “coding” and “ninjas” to form “codingninjas”
Try solving now
04
Round
Easy
Video Call
Duration75 Minutes
Interview date18 Feb 2022
Coding problem1

1. Asteroid Collision

Moderate
15m average time
85% success
0/80
Asked in companies
MicrosoftAmazonDunzo

You are given an array/list 'asteroids' representing asteroids in a row.


For each element of the given array, its absolute value denotes the size of that asteroid, and its sign denotes the direction it moves in(+ve meaning right and -ve meaning left).


An asteroid with a weight of 0 denotes a massless asteroid that moves in the right direction.


All asteroids are moving at the same speed. Whenever two asteroids collide, the smaller asteroid gets destroyed.


If both asteroids are the same size, then both asteroids get destroyed. Two asteroids moving in the same direction never collide.


You are supposed to find the state of the asteroids after all collisions.


Example :
Input: ‘asteroids’ = [3,-2,4]

Output: [3, 4]

Explanation: The first asteroid will destroy the second asteroid. Hence, after the collision, the state of the asteroids will be [3,4].
Note:
You don’t need to print anything. Just implement the given function.
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
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
5983 views
5 comments
0 upvotes