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

# SDE - 1

Amazon
3 rounds | 11 Coding problems

## Interview preparation journey

Journey
I was advised by my seniors to practice DSA from the very starting of B.Tech but I did not took that seriously. Honestly speaking, I regretted not taking their advice and in third year I started doing coding and I had to increase practice hours because I started late. But by the end of Third year, I was confident in both DSA and development but even then, I kept on revising the concepts.
Application story
I applied through their website. After almost a week, HR called and confirmed all details and then a week later, interviews were scheduled on Zoom to evaluate on basis of DSA and System design mainly.
Why selected/rejected for the role?
Every thing was fine but in the third round, I was asked a question related to shell scripting which I was not able to answer correctly. It required some deep knowledge. So always understand every concept in depth and mention only those things in resume that you are confident about.
Preparation
Duration: 6 months
Topics: Computer Fundamentals, Data Structures and Algorithms
Tip

Tip 1 : Participate in live contests on websites like Codechef, Codeforces, etc as much as possible.
Tip 2 : Practice previous interview questions from LeetCode, GeeksForGeeks.
Tip 3 : Revise Computer Science subjects like DBMS, OOPS thoroughly.

Application process
Where: Company Website
Eligibility:
Resume tip

Only write those things in the resume which you are confident of and keep practicing.

## Interview rounds

01
Round
Easy
Online Coding Test
Duration90 minutes
Interview date15 Aug 2020
Coding problem3

This is a written round on paper for everyone. Three coding questions were given. Two out of three must be correct covering every single edge case to qualify for the next round. Only the most optimal solution was to be considered.

### 1. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80

#### You are given an array 'arr' of length 'n', consisting of integers.

View more
Problem approach

I used the Kadane algorithm to solve this question and wrote a clean code with which could work on negative numbers also.

### 2. Connect n ropes with minimum cost

Easy
20m average time
80% success
0/40

#### You have been given 'N' ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal to sum of their lengths. We need to connec...

View more
Problem approach

I solved this question using a priority queue(max heap) by inserting all elements in the priority queue and then taking the maximum two out of them and pushing their sum again to the priority queue.

### 3. Left View of Binary Tree

Moderate
30m average time
60% success
0/80

#### You have been given a Binary Tree of 'n' nodes, where the nodes have integer values

##### Example :
View more
Problem approach

This was again a very standard question and solved it using recursion.

02
Round
Easy
Face to Face
Duration50 minutes
Interview date15 Aug 2020
Coding problem2

This was face to face interview round.

### 1. Triplets in Binary Tree

Easy
15m average time
85% success
0/40

#### You have been given a Binary Tree of integers and an integer 'X'. Find all the triplets in the tree whose sum is strictly greater than 'X'. The nodes in the trip...

View more
Problem approach

I thought of recursive preorder traversal and then tried storing elements in a stack but could not solve this question. Then the interviewer moved to the next question.

### 2. Loot Houses

Moderate
26m average time
0/80

#### A thief wants to loot houses. He knows the amount of money in each house. He cannot loot two consecutive houses. Find the maximum amount of money he can loot.

Problem approach

I told the interviewer dynamic programming based solution on either including the current element to current sum or excluding the current element and then he asked me to write its code and I gave properly commented code for this.

03
Round
Easy
Face to Face
Duration60 minutes
Interview date15 Aug 2020
Coding problem6

This was face to face interview round.

### 1. Basic HR Questions

Problem approach

I gave him my basic introduction with previous experience and skills.

### 2. Basic HR Questions

Why are you looking for a change? You recently joined a company and now again you are giving interviews?

Problem approach

I simply gave the reason that amazon is better than my previous company so wanted to join it.

### 3. Basic HR Questions

Tell me the difference between Mutex and Semaphores with a real-life example. (Learn)

Problem approach

Gave him a proper definition of both and then gave him an example based on classical OS problems.

### 4. Basic HR Questions

What is Normalization, and why it is done? (Learn)

Problem approach

Gave him a basic definition and real-life example of a database of a store.

### 5. Basic HR Questions

What is REST API? (Learn)

Problem approach

I told him the definition of REST and then explained it through an example of my project in which REST API was used.

### 6. Basic HR Questions

Write a shell script to parse a log file. (Learn)

Problem approach

I mentioned that I am familiar with the shell scripting in my resume but could not able to write the script as I didnâ€™t remember the syntax and thatâ€™s a learning for me that donâ€™t mention anything about anything if you are not very good about it.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Which of these collection class has the ability to grow dynamically?

Join the Discussion
3 replies
24 Jan 2023

why they reject you

??

0 replies
ABHISHEK |Level 8
19 Aug 2022

Try again Bro wishing a Good Luck from bottom of my heartâ€¦â€¦.

cheetha bano â€¦â€¦â€¦

0 replies
20 May 2022

Hey man,

You are awesome ðŸ˜Ž

0 replies
Similar interview experiences
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
0 views
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
993 views
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
367 views
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
711 views
Companies with similar interview experiences
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
48217 views