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

SDE - 1

Amazon
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice coding
Tip 2 : Learn various oops, ds concepts
Tip 3 : Prepare well what you wrote on resume

Application process
Where: Referral
Eligibility: NA
Resume Tip
Resume tip

Tip 1 : Don't lie on resume
Tip 2 : Resume should be of 1 page

Interview rounds

01
Round
Easy
Online Coding Test
Duration60 minutes
Interview date15 Jan 2022
Coding problem2

There were 2 coding questions

1. K Closest Points To Origin

Moderate
25m average time
75% success
0/80
Asked in companies
AppleFacebookAmazon

Your house is located at the origin of a 2-D plane. You have 'N' neighbours who live at 'N' different points on the plane. You want to visit exactly 'K' different neighbours who live closest to your house, you are given a 2 - D matrix 'POINTS'. So, find out the coordinates of the neighbours you are going to visit. The answer is guaranteed to be unique.

Note:

The distance between two points on a plane is the Euclidean Distance.
For Example:
If N = 2, K = 1 and the points are {2,3}, {-1, 2}.

Then the distance of the first point from the origin is sqrt((2 - 0) ^ 2 + (3 - 0) ^ 2) = sqrt(13).

The distance of the second point from the origin is sqrt((-1 - 0) ^ 2 + (2 - 0) ^ 2) = sqrt(5).
Follow Up:
Can you solve this in O(N log K) time complexity?
Try solving now

2. Minimum Cost to Make at Least One Valid Path in a Grid

Moderate
20m average time
80% success
0/80
Asked in company
Amazon

You have been given a grid of ‘N’ * ‘M’ dimension. Each cell of the grid has an integer sign pointing to the next cell which you can visit from the current cell. There can be four possible value at ‘GRID[ i ][ j ]’ :

1 - Which means you can go from (i, j)-th cell to the (i, j+1)-th cell.
2 - Which means you can go from (i, j)-th cell to the (i,   j-1)-th cell.
3 - Which means you can go from (i, j)-th cell to the (i+1, j)-th cell.  
4 - Which means you can go from (i, j)-th cell to the (i-1,  j)-th cell.

Now, you start travelling from the (0, 0)-th cell and want to visit (N-1, M-1)-th cell following a valid path. A valid path in the grid is a path which starts from the upper left cell (0,0) and ends at the bottom-right cell (M - 1, N - 1) following the signs on the grid. The valid path doesn't have to be the shortest. You are allowed to change the sign of any cell only once as per your wish by incurring a cost of 1. So you are supposed to find the minimum cost to make at least one valid path in a grid.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date15 Jan 2022
Coding problem2

Technical interview round

1. Ninja And Flip Game

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

Ninja and his friend are playing a game called flip game. They are given a string ‘STR’ containing only two characters, ‘$’ and ‘*.’

In this game, Ninja and his friend take turns to flip two consecutive “$$” to “**”. The flip game ends when Ninja or his friend can no longer make a move, i.e., there is no consecutive “$$” present in the ‘STR’ and, therefore, the other person will be the winner of the game.

Both the players play the game optimally in alternate turns. Given that Ninja starts the game i.e. takes the first turn, your task is to find out if he wins the game.

For example:
Let 'STR' = "$$**".

There are consecutive "$$" in 'STR' and it is Ninja's turn to begin the game. So, Ninja changes the consecutive "$$" to "**". This changes 'STR' to "****". 

Now, as it is his friend's turn and there are no more consecutive "$$", Ninja wins the game.
Try solving now

2. Basic HR Questions

Tell me about a time you got a feedback and how did you react to it.
Tell me about a time you had to dive really deep to handle a crucial situation.

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
2294 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