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
Application story
I applied for the opportunity through LinkedIn as I found it to be the best fit for my skills and interests. After applying, I received an invitation for the Online Assessment (OA) round and successfully cleared it. Following that, I was shortlisted for the interview, where I was asked two DSA questions
Why selected/rejected for the role?
Although I knew the solutions to the questions asked in the interview, due to fear and lack of confidence I was not able to present them properly. This affected my performance, even though I had the right knowledge.
Preparation
Duration: 6 months
Topics: DSA, OOPs , DBMS, System Design, Web Development
Tip
Tip

Tip 1: Prepare DSA questions thoroughly.
Tip 2: Be confident during the interview.
Tip 3: Prepare your project very well and be able to explain it clearly.

Application process
Where: Linkedin
Eligibility: B-tech (all branch), (Salary package: 18 LPA)
Resume Tip
Resume tip

Tip 1: Add links to your coding profiles in resume.
Tip 2: Add strong, impactful projects to your resume that demonstrate practical application of your skills.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date19 Jun 2025
Coding problem2

In the OA, here were 20 MCQs on OOPS, DBMS and 2 coding problems.

1. Find Minimum Number Of Coins

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

Given an infinite supply of Indian currency i.e. [1, 2, 5, 10, 20, 50, 100, 500, 1000] valued coins and an amount 'N'.


Find the minimum coins needed to make the sum equal to 'N'. You have to return the list containing the value of coins required in decreasing order.


For Example
For Amount = 70, the minimum number of coins required is 2 i.e an Rs. 50 coin and a Rs. 20 coin.
Note
It is always possible to find the minimum number of coins for the given amount. So, the answer will always exist.
Problem approach

1:- Initialize the DP array.
2:- Iterate through each coin.
3:- Update the number of ways for each possible sum using the current coin.
4:- Return the final number of ways.

Try solving now

2. Construct Binary Tree From Inorder and Preorder Traversal

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

You have been given the preorder and inorder traversal of a binary tree. Your task is to construct a binary tree using the given inorder and preorder traversals.


Note:
You may assume that duplicates do not exist in the given traversals.
For example :
For the preorder sequence = [1, 2, 4, 7, 3] and the inorder sequence = [4, 2, 7, 1, 3], we get the following binary tree.

Example

Problem approach

1:- Pick the root node from the first element of preorder.
2:- Find the root’s index in inorder.
3:- Split inorder into left and right subtrees.
4:- Recursively build left and right subtrees.
5:- Perform postorder traversal to get the result.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date27 Jun 2025
Coding problem2

1. LCA of Two Nodes In A BST

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

You are given a binary search tree of integers with N nodes. You are also given references to two nodes 'P' and 'Q' from this BST.


Your task is to find the lowest common ancestor(LCA) of these two given nodes.


The lowest common ancestor for two nodes P and Q is defined as the lowest node that has both P and Q as descendants (where we allow a node to be a descendant of itself)


A binary search tree (BST) is a binary tree data structure which has the following properties.

• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.


For example:
'P' = 1, 'Q' = 3
tree = 2 1 4 -1 -1 3 -1 -1 -1,

The BST corresponding will be- 

Here, we can clearly see that LCA of node 1 and node 3 is 2.
Problem approach

1:- Start at the root.
2:- If both p and q values < root value, move to root.left.
3:- If both p and q values > root value, move to root.right.
4:- Otherwise (they split or one equals root) the current root is the LCA — return it.

Try solving now

2. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
RazorpayMorgan StanleyUber

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Problem approach

1:- Initialize two arrays arr1 and arr2 of size n.
2:- Fill arr1[i] with the maximum height from start up to index i.
3:- Fill arr2 [i] with the maximum height from end up to index i.
4:- For each index i, compute water[i] = min(arr1[i], arr2 [i]) - height[i].
5:- Sum up all water[i] values to get the total trapped water.

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

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
2970 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2220 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
1553 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
12553 views
2 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Microsoft
5885 views
5 comments
0 upvotes