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

SDE - 1

Amazon
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
In the beginning, I started learning about basics concept including array, string, stack, queue and solving questions on hackerrank and after becoming confident in these basic topic I move to the next set of topic including link list, tree, graph, dp, etc. I started practicing these topic on Geeksforgeeks, leetcode, codeforces.
Application story
Applied through on Campus placement and the entire process was in online mode. The first round was online technical test that contain coding question . After clearing online technical round then 3 interview round are there, 2 was taken by SDEs and last one by Manager.
Why selected/rejected for the role?
I was selected for the role because I able to satisfy the interviewer with my answer on all DSA problems as well as competitive mathematical problems
Preparation
Duration: 8 months
Topics: Data Structures and Algorithms, OOPS, Operating system, Database, Recursion, Dynamic Programming, React.
Tip
Tip

Tip 1 : Do solving questions on Codeforces, geeksforgeeks, leetcode regularly
Tip 2 : Make a goal to complete particular set of questions every day.
Tip 3 : Focus on project as per your interest

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Highlights key word in resume 
Tip 2 : Resume must be in proper format
Tip 3 : Modify your resume as per role you applying for.

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 minutes
Interview date22 Jun 2022
Coding problem2

It was at 1pm

1. Longest Substring with At Most K Distinct Characters

Moderate
20m average time
80% success
0/80
Asked in companies
AmazonMedia.netGoldman Sachs

You are given a string 'str' and an integer ‘K’. Your task is to find the length of the largest substring with at most ‘K’ distinct characters.

For example:
You are given ‘str’ = ‘abbbbbbc’ and ‘K’ = 2, then the substrings that can be formed are [‘abbbbbb’, ‘bbbbbbc’]. Hence the answer is 7.
Try solving now

2. Diameter of Binary Tree

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

You are given a Binary Tree.


Return the length of the diameter of the tree.


Note :
The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.

The number of edges between two nodes represents the length of the path between them.
Example :
Input: Consider the given binary tree:

Example

Output: 6

Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.


Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date28 Jun 2022
Coding problem2

It was at 3pm to 4pm on chime application.

1. Target Sum

Moderate
0/80
Asked in companies
OLX GroupZSAmazon

You are given an array ‘ARR’ of ‘N’ integers and a target number, ‘TARGET’. Your task is to build an expression out of an array by adding one of the symbols '+' and '-' before each integer in an array, and then by concatenating all the integers, you want to achieve a target. You have to return the number of ways the target can be achieved.

For Example :
You are given the array ‘ARR’ = [1, 1, 1, 1, 1], ‘TARGET’ = 3. The number of ways this target can be achieved is:
1. -1 + 1 + 1 + 1 + 1 = 3
2. +1 - 1 + 1 + 1 + 1 = 3
3. +1 + 1 - 1 + 1 + 1 = 3
4. +1 + 1 + 1 - 1 + 1 = 3
5. +1 + 1 + 1 + 1 - 1 = 3
These are the 5 ways to make. Hence the answer is 5.
Try solving now

2. Left View Of a Binary Tree

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

You have been given a binary tree of integers. You are supposed to find the left view of the binary tree. The left view of a binary tree is the set of all nodes that are visible when the binary tree is viewed from the left side.

Example:

example

The left view of the above binary tree is  {5, 7, 14, 25}.
Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date11 Jul 2022
Coding problem2

It was at 5pm to 6pm on chime.

1. Minimum Steps

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

You are given an array ‘ARR’ consisting of ‘N’ integers. Your task is to make all the numbers equal. You decrease one of the largest numbers present in the array into a number that is just lower than the maximum number in one step.

For example:
You are given ‘ARR’ = [5, 2, 3]
In the first step, you can change 5 to 3, so the new array is [3, 2,3].

In the second step, you can change the 3 to 2, then the array is [2, 2,3].

In the third step, you can change the 3 to 2, then the array is [2, 2, 2] 

Hence the answer is 3.
Try solving now

2. 3Sum

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".
Try solving now
04
Round
Medium
Video Call
Duration60 minutes
Interview date29 Jul 2022
Coding problem1

It was at 11 pm on chime application taken by Manager.
They asked about my educational and employment journey including my project written in my resume with questions of why, how, what.

1. Make It Palindrome

Easy
25m average time
70% success
0/40
Asked in companies
SAP LabsAmazonWestern Digital

You are given an array ‘A’ of length ‘N’ consisting only of positive integers. Your task is to make the given array a palindrome by using a minimum number of operations. In one operation, you can select two adjacent indexes and merge them by adding their values. After every operation, the length of the array decreases by one.

Note: An array of length ‘1’ is a palindrome.

For example:

Let’s say the array ‘A’ = [1, 2, 3, 4, 5], then after merging indexes 2 and 3, the array ‘A’ will look like [1, 5, 4, 5].
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
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