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

SDE - 1

Amazon
upvote
share-icon
5 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 12 Months
Topics: OOPs, Operating System, Data Structure, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice as much as you can. Solve a different variety of questions.
Tip 2 : Mention some good projects on your resume.
Tip 3 : Work on your communication skills.

Application process
Where: Campus
Eligibility: 7 CGPA
Resume Tip
Resume tip

Tip 1 : Mention some good projects on your resume.
Tip 2 : Do not put false things on a resume.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 Minutes
Interview date3 Nov 2020
Coding problem2

Round 1 was an online coding round consisting of 2 coding questions and 28 MCQs based on C, C++, Java, data structures, algorithms, and core subjects. I solved both the coding questions completely. After getting shortlisted, a total of 4 interviews were to take place, each being eliminative in nature. The time for each was fixed to 60 minutes each and each of them involved writing the complete code on an IDE link shared by the interviewer. For each question, time complexity has to be told.

1. Infix To Postfix

Easy
20m average time
80% success
0/40
Asked in companies
DelhiveryOracleExpedia Group

You are given a string 'exp' which is a valid infix expression.


Convert the given infix expression to postfix expression.


Note:
Infix notation is a method of writing mathematical expressions in which operators are placed between operands. 

For example, "3 + 4" represents the addition of 3 and 4.

Postfix notation is a method of writing mathematical expressions in which operators are placed after the operands. 

For example, "3 4 +" represents the addition of 3 and 4.

Expression contains digits, lower case English letters, ‘(’, ‘)’, ‘+’, ‘-’, ‘*’, ‘/’, ‘^’. 


Example:
Input: exp = ‘3+4*8’

Output: 348*+

Explanation:
Here multiplication is performed first and then the addition operation. Hence postfix expression is  3 4 8 * +.


Try solving now

2. Mean Median Mode

Easy
10m average time
80% success
0/40
Asked in companies
MicrosoftAmazonMobiKwik

You are given an array 'ARR' of 'N' integers and you have to calculate 3 things for the given array:-

1. Mean - function mean(): This function should calculate the mean of the array.

2. Median - function median(): This function should calculate the median of the array.

3. Mode - function mode(): This function should calculate the mode of the array.

Note :
It can be shown that Mean and Median is in the form of P/Q, where P and Q are coprime integers and Q != 0. You need to return P and Q.

For Mode, if the highest frequency of more than one element is the same, return the smallest element.

For Example, for the given array {1, 1, 2, 2, 3, 3, 4}, the mode will be 1 as it is the smallest of all the possible modes i.e 1, 2 and 3.
Try solving now
02
Round
Easy
Video Call
Duration90 minutes
Interview date4 Nov 2020
Coding problem2

The interviewer started directly by giving coding questions. He gave me two coding questions. I solved using the basic approach first then he asked me to improve my time and space complexity. Then I improved my algorithm.
I was able to solve both the questions in around 55 minutes. The interviewer seemed satisfied. I got a mail for the second interview after 2 days and the interview was scheduled after 2 days.

1. Reverse DLL nodes in groups

Moderate
10m average time
90% success
0/80
Asked in companies
AdobeAmazonMicrosoft

You are given a Doubly Linked List of integers and a positive integer 'K' representing the group size. Modify the linked list by reversing every group of 'K' nodes in the linked list.

A doubly linked list is a type of linked list that is bidirectional, that is, it can be traversed in both directions, forward and backward. 
Note:
If the number of nodes in the list or in the last group is less than K, just reverse the remaining nodes. 
Example:
Linked list: 8 9 10 11 12
K: 3 

Output: 10 9 8 12 11

We reverse the first K (3) nodes. Now, since the number of nodes remaining in the list (2) is less than K, we just reverse the remaining nodes (11 and 12).  
Try solving now

2. STRING KA KHEL

Moderate
15m average time
85% success
0/80
Asked in companies
WalmartCIS - Cyber InfrastructureAmazon

Ninja started a gaming shop and for that shop, he is planning to make a new game ‘String Ka Khel’. In that game user is provided with ‘N’ number of strings and he has to find out the maximum length of strings he can form by joining these ‘N’ strings. For joining two strings there is a condition that two strings will only join if the last character of the first string is same as the last character of the second string. If the user will find out the correct answer he will be given Coding Ninja goodies by the Ninja.

So your task is to find the maximum length of string which can be formed by joining strings according to the given condition. If no such combination exists return ‘0’. Strings only contain the letter ‘B’ and ‘R’.

Example:

The string is ‘RR’, ‘RB’ so we can combine ‘RR’ and ‘RB’ as the last character of ‘RR’ i.e ‘R’ matches with the first character of ‘RB’. But we cant combine ‘RB’ and ‘RR’ as the last character of ‘RB’ i.e ‘B’ doesn't matches with the first character of ‘RR’ i.e ‘R’ so our answer is '4'.
Try solving now
03
Round
Easy
Video Call
Duration90 Minutes
Interview date7 Nov 2020
Coding problem1

The interview started with the interviewer’s introduction and then my introduction and then one coding question. Then he asked me to improve this. So I improved my time complexity. The interviewer was very friendly and helpful. Then we had some discussion on OOPs.

1. Sum of minimum and maximum elements of all subarrays of size “K”

Moderate
25m average time
75% success
0/80
Asked in companies
AmazonCultfitNagarro Software

You are given an array consisting of N integers, and an integer, K. Your task is to determine the total sum of the minimum element and the maximum element of all subarrays of size K.

Note :

The array may contain duplicate elements.
The array can also contain negative integers.
The size of the array is at least 2.
There exists at least one such subarray of size k.
Try solving now
04
Round
Hard
Video Call
Duration60 Minutes
Interview date9 Nov 2020
Coding problem2

This was a technical round. The interviewer gave me two coding problems to solve.
And questions on os(Explain Banker’s algorithm with an example, Thrashing, Deadlock, Semaphore, etc), DBMS(ACID properties), oops, and projects.

1. Family Structure

Easy
10m average time
90% success
0/40
Asked in companies
OptumAmazonD.E.Shaw

Aakash is a member of Ninja club. He has a weird family structure. Every male member (M) gives birth to a male child first and then a female child, whereas every female (F) member gives birth to a female child first and then to a male child. Aakash analyses this pattern and wants to know what will be the Kth child in his Nth generation. Can you help him?

A sample generation tree is shown, where ‘M’ denotes the male member and ‘F’ denotes the female member. 

Note
The generation tree starts with a male member i.e. Aakash. 
Every member has exactly two children. 
The given N and K will always be valid. 
Try solving now

2. Next Greater Element

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftAmazonDisney + Hotstar

You have been given an array/list ‘ARR’ consisting of ‘N’ positive integers. Your task is to return the Next Greater Element(NGE) for every element.

The Next Greater Element for an element ‘X’ is the first element on the right side of ‘X’ in the array 'ARR', which is greater than ‘X’. If no such element exists to the right of ‘X’, then return -1.

For example:
For the given array 'ARR' = [7, 12, 1, 20]

The next greater element for 7 is 12.
The next greater element for 12 is 20. 
The next greater element for 1 is 20. 
There is no greater element for 20 on the right side.

So, the output is [12, 20, 20, -1].
Try solving now
05
Round
Easy
HR Round
Duration60 Minutes
Interview date10 Nov 2020
Coding problem0

Started with the introduction, project questions, and behavioral questions. Like, Give an example where you spent some time and figured out something on your own.

1. Given two arrays move an element from one array to another only if the average of both the arrays becomes greater than the previous average find which element can be moved.
2. Some BFS related questions don’t remember exactly
3. Minimum element in the stack without using another stack

In the first question, I got nervous and couldn’t come up with an approach. The interviewer was very friendly and helped me to understand the approach and then asked me to write the code. The next two questions I was able to solve.

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