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

SDE - Intern

Amazon
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Trees , Linklist , Graph , Arrays , Binary search
Tip
Tip

Tip 1 : Strengthen your base , by doing easy level questions , then try medium level and then hard
Tip 2 : You will face many problems while preparing but stay focused towards your goal

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

Tip 1 : A few good projects will do the work
Tip 2 : Provide links of coding platform you are doing well

Interview rounds

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

There were 30 MCQ and 7 Debugging question and two coding question
Then technical interview 1
Then last technical plus hr Interview

1. Flatten BST To A Sorted List

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

You have been given a Binary Search Tree (BST). Your task is to flatten the given BST to a sorted list. More formally, you have to make a right-skewed BST from the given BST, i.e., the left child of all the nodes must be NULL, and the value at the right child must be greater than the current node.

A binary search tree (BST), also called an ordered or sorted binary tree, is a rooted binary 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.

Follow Up :
Can you solve this in O(N) time and O(H)  space complexity?
Problem approach

Tip 1 : Practising trees questions on leetcode
Tip 2 : Knowing the inorder , preorder traversal of tree

Try solving now

2. Prerequisite Task

Moderate
35m average time
65% success
0/80
Asked in companies
ArcesiumAmazonAmazon

You are given a positive integer ‘N’ denoting the number of tasks you need to finish. You can directly start performing any task, but some tasks have some prerequisites, i.e. to perform some task you may first need to complete some other tasks.

You are given a list of pairs of dependencies in the form of ( U, V ) which means to perform task ‘U’ you first need to finish the task ‘V’. You need to report whether it is possible to complete all the tasks or not. Return true if it is possible to finish all the tasks else return false.

Problem approach

Tip 1 : Knowledge of graph
Tip 2 : Practising problems of graph on leetcode

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date20 Nov 2020
Coding problem2

Two questions were given to me and requested to solve in the desired time.

1. Sort Linked List

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

You are given a Singly Linked List of integers which is sorted based on absolute value.

You have to sort the Linked List based on actual values.

The absolute value of a real number x, denoted |x|, is the non-negative value of x without regard to its sign.

Example:
If the given list is {1 -> -2 -> 3} (which is sorted on absolute value), the returned list should be {-2 -> 1 -> 3}.
Problem approach

Tip 1 : Linked List knowledge is needed.

Try solving now

2. 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.
Problem approach

Tip 1 : Tree traversal knowledge

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date20 Nov 2020
Coding problem1

Two questions were asked but I don't remember the second one.

1. Split the given array into K sub-arrays

Hard
15m average time
85% success
0/120
Asked in companies
AmazonTrilogy InnovationsD.E.Shaw

You’re given an array 'arr' of size 'n' and an integer 'k'.

Your task is to split 'arr' into 'k' sub-arrays such that the maximum sum achieved from the 'k' subarrays formed must be the minimum possible.

A subarray is a contiguous part of the array.

Return the minimum possible value of the maximum sum obtained after splitting the array into 'k' partitions.


Example:
Input: ‘arr’ = [1, 1, 2] and ‘k’ = 2 

Output: 2

Explanation: If we want to make two subarrays, there are two possibilities: [[1], [1, 2]] and [[1, 1], [2]]. We can see that the maximum sum of any subarray is minimized in the second case. Hence, the answer is 2, which is the maximum sum of any subarray in [[1, 1], [2]].


Problem approach

Binary search was needed to solve this I wasn't able to tell that

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