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

SDE - Intern

Amazon
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Recursion, Dynamic programming, OOPS, Sysytem Design, Trees
Tip
Tip

Tip 1 : Do atleast 3 major web dev project
Tip 2 : Practice from interview bit
 

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

Tip 1 : Resume should not be more than 1 page
Tip 2 : Be precise

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date22 Oct 2020
Coding problem2

Timing (6pm - 8pm)
Environment was user friendly 
As usual the online round had two coding questions and 20 MCQs. This was a pretty easy round and it’s duration was 90 minutes. The round consisted of questions from various domains like Algorithm, Data Structure, Operating System and Aptitude.

A few days after appearing in this round, I was informed that I have been qualified for the next round.

1. Sorted Subsequence of Size 3

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

You are given an array consisting of N elements and you need to find a subsequence consisting of three elements such that the elements, in the subsequence, are in strictly increasing order.

Note:
There may be multiple such subsequences, so return any one of them.
Example:
Let the array be [100, 22, 13, 45, 59, 26]. The possible subsequences of size 3, whose elements follow increasing order are {22, 45, 59}, {13, 45, 59}.
Try solving now

2. Check if two trees are Mirror

Easy
15m average time
85% success
0/40
Asked in companies
SamsungHCL TechnologiesQualcomm

You are given two arbitrary binary trees consisting of N and M number of nodes respectively, your task is to check whether the two trees are mirror of each other or not.

Two trees are said to be mirror of each other, if

1. Roots of both the given trees are same.
2. Left subtree of the root of the first tree is the mirror of the right subtree of the root of the second tree.
3. Right subtree of the root of the first tree is the mirror of the left subtree of the root of the second tree.

For example,both the given trees are mirror image of each other: example

Try solving now
02
Round
Medium
Video Call
Duration90 minutes
Interview date5 Nov 2020
Coding problem2

Timing (10 am- 11 am)
For this round I had slightly more time than the last, due to the fact that the weekend fell in between.The interviewer was very very cool and helping this time, something which I kept at the last in my list of probable things that can happen during an interview. Duration of this round was around 90 minutes.

This time I had to face three technical questions and one general question on Amazon.

1. Convert Bst To The Greater Sum Tree

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

You have been given a Binary Search Tree of integers. You are supposed to convert it to a greater sum tree such that the value of every node in the given BST is replaced with the sum of the values of all the nodes which are greater than the value of the current node in the tree.

A Binary Search Tree is a tree, whose internal nodes each store a value greater than all the values in the node's left subtree and less than those in its right subtree.

Note :

You need to modify the given tree only. You are not allowed to create a new tree.
For example:
For the given binary search tree

Example

11 will be replaced by {15 + 29 + 35 + 40}, i.e. 119.
2 will be replaced by {7 + 11 + 15 + 29 + 35 + 40}, i.e. 137.
29 will be replaced by {35 + 40}, i.e. 75.
1 will be replaced by {2 + 7 + 11 + 15 + 29 + 35 + 40}, i.e. 139.
7 will be replaced by {11 + 15 + 29 + 35 + 40}, i.e. 130.
15 will be replaced by {15 + 29 + 35 + 40}, i.e. 104.
40 will be replaced by 0 {as there is no node with a value greater than 40}.
35 will be replaced by {40}, i.e. 40.
Try solving now

2. Game of 3

Easy
30m average time
70% success
0/40
Asked in company
Amazon

The Ultimate Ninja Ankush was bored, so his friend Ninja Nikhil decided to give him a puzzle to keep him entertained. Nikhil gave Ankush ‘N’ integers and asked how many groups of sizes 2 and 3 can be formed such that the sum of the group is divisible by 3. Although the Ultimate Ninja Ankush is brilliant, some extra help is always appreciated. Can you help The ultimate ninja Ankush with this so that he can prove to Nikhil that he, in fact, is the ultimate ninja?

More formally, Given an array of size ‘N’, we can form a group of two or three. The group should be such that the sum of all elements in that group is a multiple of 3. Count all possible numbers of groups that can be generated in this way.

For example

Given:
‘N’ = 5, ‘ARR’ = [1, 2, 3, 4, 5].
The answer will be two since 8 since 8 pairs can be formed and those are  (1,2), (1,5), (2,4), (4,5),(1,2,3), (3,4,5), (1,3,5), (2,3,4). Therefore the final answer is 8.
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 - Intern
3 rounds | 3 problems
Interviewed by Amazon
2163 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 7 problems
Interviewed by Amazon
1068 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
1043 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3502 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Microsoft
8187 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Microsoft
4915 views
2 comments
0 upvotes