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

SDE - 1

Amazon
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data structures, Algorithms, OOPS, Database, Operating systems
Tip
Tip

Tip 1 : Solve 3-4 Leet code questions daily
Tip 2 : Practice advanced Algorithms Graph and shortest path
Tip 3 : Put timer for each question while practice

Application process
Where: Email Approach
Resume Tip
Resume tip

Tip 1 : Should show projects/ industrial experience
Tip 2 : Should show competitive programming skills

Interview rounds

01
Round
Hard
Coding Test - Pen and paper
Duration80 minutes
Interview date21 May 2022
Coding problem2

This was a screening round. It started around 10 AM in the morning.
We were provided a sheet of question paper with two questions on that. 
We were expected to write the production ready code for both of them.

After we were done with writing the answers they were evaluated. And based on evaluation people were sent home or sent for next round of interview.

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

Used Bellman-Ford Algorithm to find the shortest path.

Try solving now

2. Maximum Possible Time

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftAmazonGrofers

Given an array/list ‘ARR’ having 4 integer digits only. The task is to return the maximum 24 hour time that can be formed using the digits from the array.

Note:

The minimum time in 24-hour format is 00:00, and the maximum is 23:59. If a valid time cannot be formed then return -1.

Example:

We have an array ARR = {1, 2, 3, 4} so the maximum time that will be formed will be 23:41.
Problem approach

1. Find all the permutations of the provided 4 digits.
2. Check if it valid - (It is in 24hrs format)
3. Maintain a max time which will be updated post each valid permutation.

Try solving now
02
Round
Medium
Face to Face
Duration45 minutes
Interview date21 May 2022
Coding problem1

It started in the afternoon. Two of my interviewers came to me while I was waiting after passing my first round. They took me into a meeting room. Where they first introduced themselves and asked me some behavioural questions and then I was given a coding problem to solve on white board and then write the production ready code for the same

1. Split the given array into K sub-arrays

Hard
15m average time
85% success
0/120
Asked in companies
AmazonTrilogy InnovationsD.E.Shaw

You’re given an array 'arr' of size 'n' and an integer 'k'.

Your task is to split 'arr' into 'k' sub-arrays such that the maximum sum achieved from the 'k' subarrays formed must be the minimum possible.

A subarray is a contiguous part of the array.

Return the minimum possible value of the maximum sum obtained after splitting the array into 'k' partitions.


Example:
Input: ‘arr’ = [1, 1, 2] and ‘k’ = 2 

Output: 2

Explanation: If we want to make two subarrays, there are two possibilities: [[1], [1, 2]] and [[1, 1], [2]]. We can see that the maximum sum of any subarray is minimized in the second case. Hence, the answer is 2, which is the maximum sum of any subarray in [[1, 1], [2]].


Problem approach

Keep dividing the array from start index and maintain max for left sub-array and min for right sub-array.
If at any point we find that the max of left sub-array is less than the min of the right sub-array. then that index is the result index which will surely divide our array into two parts such that every element in the right sub-array strictly greater than every element in left sub-array.

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