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

SDE - 1

Amazon
upvote
share-icon
4 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Greedy algorithms, Graph algorithms, OOPS, Linked List, Behavorial questions
Tip
Tip

Tip 1 : Look out for the behavioural questions
Tip 2 : Be ready to write production-level code (No edge case misses in your final code)
Tip 3 : Make sure to dictate and walk through the solution instead of blatantly writing code

Application process
Where: Other
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Mention previous experiences with individual contributions
Tip 2 : Include projects with high impacts if low in work experience

Interview rounds

01
Round
Easy
Online Coding Interview
Duration80 minutes
Interview date1 Mar 2022
Coding problem2

2 DSA questions along with some debugging questions

1. Minimum Number of Platforms Needed

Easy
23m average time
85% success
0/40
Asked in companies
Lenskart.comQualcommGartner

You are given the arrival and departure times of N trains at a railway station in a day. You need to find the minimum of platforms required for the railway station such that no train waits i.e No train should wait for the platform to be clear or free.

Problem approach

You had to make greedy choices at each step and find the optimal solution

Try solving now

2. Count Ways To Reach The N-th Stairs

Moderate
30m average time
80% success
0/80
Asked in companies
OYOLinkedInGrab

You have been given a number of stairs. Initially, you are at the 0th stair, and you need to reach the Nth stair.


Each time, you can climb either one step or two steps.


You are supposed to return the number of distinct ways you can climb from the 0th step to the Nth step.

Note:

Note: Since the number of ways can be very large, return the answer modulo 1000000007.
Example :
N=3

Example

We can climb one step at a time i.e. {(0, 1) ,(1, 2),(2,3)} or we can climb the first two-step and then one step i.e. {(0,2),(1, 3)} or we can climb first one step and then two step i.e. {(0,1), (1,3)}.
Problem approach

It was either of the 3 choices for each step and could be easily solved by using DP and memoising optimal ans for a state to compute ones in the future.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date6 Apr 2022
Coding problem2

1 Behavorial question + 2 DSA questions

1. 3 Sum

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

You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.

An array is said to have a triplet {ARR[i], ARR[j], ARR[k]} with sum = 'K' if there exists three indices i, j and k such that i!=j, j!=k and i!=j and ARR[i] + ARR[j] + ARR[k] = 'K'.

Note:
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Problem approach

Sort the array and use the 2 pointer technique to find triplets that sum up to a given (X) -> expected Time complexity -> O(N^2)

Try solving now

2. Find if the given Linked List is a palindrome

Easy
20m average time
90% success
0/40
Asked in companies
AmazonAppleMicrosoft

You are given a singly Linked List of integers. Your task is to return true if the given singly linked list is a palindrome otherwise returns false.

For example:
The given linked list is 1 -> 2 -> 3 -> 2-> 1-> NULL.

It is a palindrome linked list because the given linked list has the same order of elements when traversed forwards and backward​.
Follow Up:
Can you solve the problem in O(N) time complexity and O(1) space complexity iteratively?
Problem approach

Solved it in 2 steps
1) Find the middle of the Linked List (Standard problem)
2) Reverse the second hald of the Linked List(Standard problem)

Compare both havles and return the result

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date7 Apr 2022
Coding problem2

1 Behavorial question + 2 questions on DSA

1. Find the distance between 2 nodes on a binary tree

Moderate
25m average time
60% success
0/80
Asked in companies
PhilipsSAP LabsPhonePe

Given a binary tree and the value of two nodes, find the distance between the given two nodes of the Binary Tree.

Distance between two nodes is defined as the minimum number of edges in the path from one node to another.

Problem approach

Gave the approach that dist(a,b) = distFromRoot(a) + distFromRoot(b) - 2*distFromRoot(LCA(a,b))

Try solving now

2. Find all paths in a binary tree that start from root and end at the leaf having path sum equal to X

Moderate
25m average time
75% success
0/80
Asked in companies
AmazonSamsung R&D InstituteMedia.net

Kevin has written some integers on a paper. He then selects some integers and draws a line between them. Fortunately, his diagram represents a binary tree. Today, his friend challenged him to find the paths that start from root and end at the leaf in his diagram whose sum is exactly equal to the number ‘K’. But, Kevin has another important piece of work and so, he appoints you to do his task.

All you have to do is to find the paths in his diagram whose sum is exactly equal to the number ‘K’.

For Example:

Example

Consider the above binary tree. If ‘K’ is 15 then the required paths are [5, 6, 4] and [5, 15, -5].
Problem approach

Could only give the approach as was low on time, that we could run a traversal from each node and generate all paths from a specific node to check if it had an average of X and appeand to the answer if the case. 

O(N^2)

Try solving now
04
Round
Easy
Video Call
Duration60 minutes
Interview date8 Apr 2022
Coding problem2

Past work discussion + 1 DSA question

1. Find Duplicates In Array

Easy
15m average time
90% success
0/40
Asked in companies
OYOIBMAcko

You are given an array/list 'ARR' consisting of N integers, which contains elements only in the range 0 to N - 1. Some of the elements may be repeated in 'ARR'. Your task is to find all such duplicate elements.

Note:
1. All the elements are in the range 0 to N - 1.
2. The elements may not be in sorted order.
3. You can return the duplicate elements in any order.
4. If there are no duplicates present then return an empty array.
Problem approach

Just a simple hashmap solution or a sorting based solution

Try solving now

2. Behavioural Questions

1) Discussion on previous work 

2) Largest impact you have had in your previous organisation

Problem approach

Had a chat , was thrown some counter questions and addressed them

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