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

SDE - 1

Amazon
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I started coding in 2nd year of college, I also participated in lots of coding contest in almost every coding platform which gives me a confidence. So my suggestion is to do participate in every coding contest.
Application story
Recruiter Contacted me and asked me that I am interested or not to join Amazon. After that she sends me the application form for the position of SDE 1. After 2 days I got the test link. After 2 days I got the first round of interview Invitation.
Why selected/rejected for the role?
Its because of my problem solving skill and presentation skill. Its a very important to present your solution because if you are not able to present well interviewer will not able to understand your approach or solution which results you fail.
Preparation
Duration: 6 months
Topics: Graph, Tree, Dynamic Programming, Stack, Queue, Priority Queue
Tip
Tip

Tip 1 : Participate in every coding contest
Tip 2 : Increase up solving

Application process
Where: Other
Eligibility: 6.5 CGPA
Resume Tip
Resume tip

Tip 1: Mention atleast two project
Tip 2: Do not put false things on resume

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 mins
Interview date16 May 2022
Coding problem2

Online Round consists of 2 Coding Question and we have to explain your solution ex - Time Complexity and space complexity. I have to complete coding question and explanation in 90 mins only.

1. Minimum Operations To Make Array Equal

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

You are given an array ‘ARR’ of length ‘N’ which is filled with the values such that ARR[i] = (2*i + 1). You have to perform operations on the ‘ARR’ to make all elements of the array equal. In one operation, you can choose two elements from the array ‘ARR’ say ‘i’ and ‘j’, and can increment the value of ‘ARR[i]’ by one and decrement the value of ‘ARR[j]’ by one.

You have to find the minimum number of operations to make all the elements of the array ‘ARR’ equal. It is guaranteed that all elements of the array can be made equal using some operations.

Try solving now

2. Maximum In Sliding Windows Of Size K

Moderate
20m average time
80% success
0/80
Asked in companies
AppleWalmartOYO

Given an array/list of integers of length ‘N’, there is a sliding window of size ‘K’ which moves from the beginning of the array, to the very end. You can only see the ‘K’ numbers in a particular window at a time. For each of the 'N'-'K'+1 different windows thus formed, you are supposed to return the maximum element in each of them, from the given array/list.

Try solving now
02
Round
Medium
Video Call
Duration60 mins
Interview date25 May 2023
Coding problem1

Interviewer asked me two DSA Question and interview expectation is to solve this question and also explain them as well in 60 mins.

1. Ninja and the greatest number

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

Ninja has been given an array/list of integers ‘ARR’ of size ‘N’. Ninja has to find the greatest number present in the ‘ARR’ such that this number is also equal to the product of the two elements present in the ‘ARR’.

Note:

1. The pair should be from different indices. 
2. If no such number is present in the ‘ARR’, then return -1.
Try solving now
03
Round
Medium
Video Call
Duration60 mins
Interview date1 Jun 2023
Coding problem2

Interviewer asked me two DSA Question and interview expectation is to solve this question and also explain them as well in 60 mins.

1. Postorder Successor

Moderate
15m average time
0/80
Asked in companies
AmazonLendingkart

You are given a binary tree having ‘N’ distinct nodes and an integer ‘M’, you have to return the postorder successor of ‘M’.

Note:

The postorder successor of ‘M’ is defined as the next element to ‘M’ in the sequence of postorder traversal.

If the postorder traversal of a tree is 3 5 4 7 then the postorder successor of 5 is the next element to 5 i.e 4.

Return ‘-1’ if there is no postorder successor of ‘M’.
Problem approach

1. If the right child of a given node exists, then the right child is the postorder predecessor.
2. If the right child does not exist and the given node is left child of its parent, then its sibling is its Postorder predecessor.
3. If none of the above conditions are satisfied (left child does not exist and given node is not the right child of its parent), then we move up using parent pointers until one of the following happens. 
4. We reach the root. In this case, the Postorder predecessor does not exist.
5. The current node (one of the ancestors of the given node) is the right child of its parent, in this case, the postorder predecessor is the sibling of the current node.

Try solving now

2. Maximum Subtree Sum

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

You are given an arbitrary binary tree consisting of N nodes. Your task is to find the largest subtree sum.

Note :

1. The value of any node will not be equal to zero.
2. Subtree of a node X is all the nodes that are below X and X itself.
3. For example in the tree given below, nodes 1, 2 and 3 are in subtree of 1.

altImage

4. Subtree sum of X is the sum value of all the nodes in subtree of X.  
5. Binary tree is a tree wherein each node has at most two children.  
6. Any two nodes may have the same value associated with it.
Problem approach

I solved the question and explained my approach and the time complexity of my solution to him. He then showed me multiple code snippets and asked me to calculate time complexities for each of them. He asked to calculate the time complexity of the Sieve of the Eratosthenes algorithm.

Try solving now
04
Round
Easy
Video Call
Duration60 mins
Interview date15 Jun 2023
Coding problem1

Interviewer asked me 1 DSA Question for 45 min and interview expectation is to solve this question and also explain them as well in 45 mins and rest 15 min is for LP.

1. Optimal Ordering Of Tasks

Moderate
15m average time
85% success
0/80
Asked in companies
AmazonalibabaIon Group

You are given ‘N’ tasks. Each task has its own duration and deadline stored in array/list 'ARR'. You have to do all the tasks. Reward earned by doing a task is ‘deadline of the task’ - ‘time when the task is done’.

You have to order the tasks in such a way that the sum of rewards is maximized and find the maximum sum of the reward.

Note :

1. The time starts from zero. 
2. Before completing one task another task can not be started. 
3. The reward for doing a task can be negative. 
Problem approach

All tasks are nodes of the graph and if task u is a prerequisite of task v, we will add a directed edge from node u to node v. Now, this problem is equivalent to finding a topological ordering of nodes/tasks (using topological sorting) in the graph represented by prerequisites. If there is a cycle in the graph, then it is not possible to finish all tasks (because in that case there is no any topological order of tasks). Both BFS and DFS can be used for topological sorting to solve it. Since pair is inconvenient for the implementation of graph algorithms, we first transform it to a graph. If task u is a prerequisite of task v, we will add a directed edge from node u to node v

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
3085 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2295 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
8963 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
5984 views
5 comments
0 upvotes