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

SDE - 1

Amazon
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4.5 months
Topics: Data Structures, OOPS, OS, DBMS, Dynamic Programming, Trees/Graph, Tries, Hashing, Algorithms, Hadoop
Tip
Tip

Tip 1 : 1 Programming Language
Tip 2 : Practice Data Structures with atleast 300 ques.
Tip 3 : CS Fundamental

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

Tip 1 : 1 Pager
Tip 2 : Add top 3 projects in Resume.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration120 minutes
Interview date16 Sep 2020
Coding problem2

Evening test around 5
Platform :- SHL
Environment was amazing

1. Subtree of Another Tree

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

Given two binary trees T and S, check whether tree S has exactly the same structure and node values with a subtree of T, i.e., check if tree S is a subtree of the tree T.

A subtree of a tree T is a tree S consisting of a node in T and all of its descendants in T. The subtree corresponding to the root node is the entire tree; the subtree corresponding to any other node is called a proper subtree.

Try solving now

2. Search in a row wise and column wise sorted matrix

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

You are given an 'N * N' matrix of integers where each row and each column is sorted in increasing order. You are given a target integer 'X'.


Find the position of 'X' in the matrix. If it exists then return the pair {i, j} where 'i' represents the row and 'j' represents the column of the array, otherwise return {-1,-1}


For example:
If the given matrix is:
[ [1, 2, 5],
  [3, 4, 9],
  [6, 7, 10]] 
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date1 Oct 2020
Coding problem2

1 Hour 
Afternoon

1. Intersection of Linked List

Easy
25m average time
73% success
0/40
Asked in companies
GoogleCognizantAccenture

You are given two Singly Linked Lists of integers, which may have an intersection point.

Your task is to return the first intersection node. If there is no intersection, return NULL.


Example:-
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

alt.txt

Try solving now

2. Pair sum in a BST

Easy
15m average time
80% success
0/40
Asked in companies
MicrosoftFlipkartPaytm (One97 Communications Limited)

You are given a binary search tree and an integer ‘S’. Your task is to find all the pairs of nodes in the BST which sum to the value ‘S’. If no such pair exists, then print -1 - 1.

Note:

You can use extra space of the order of not more than O(log n).

A binary search tree (BST) is a binary tree data structure which has the following properties.
• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.

Note:

1. All the elements of the Binary Search Tree are unique.
2. You can’t use the same node value/element of BST twice.
Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date1 Oct 2020
Coding problem2

Online Round held on Chime

1. Is Binary Heap Tree

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

You have been given a binary tree of integers.

Your task is to check if it is a binary heap tree or not.

Note:

A binary tree is a tree in which each parent node has at most two children. 

A binary heap tree has the following properties. 
1. It must be a complete binary tree. In the complete binary tree every level, except the last level, is completely filled and the last level is as far left as possible.

2. Every parent must be greater than its all children nodes.
For example:
Consider this binary tree:

binary_heap

Figure 1 is a complete binary tree because every level, except the last level, is completely filled and the last nodes are as far left as possible, and the level has 2 nodes both on the left side.

Figure 2 is not a complete binary tree because level 2 (level is 0 based) is not completely filled means the right child of the node (36) is missing.
There is another reason, in the last level, there can be one another node in between node (1) and node (14) to make the binary tree as far left as possible.
Note:
1. In the world of programming two types of binary heap tree possible:
   a. Min-heap - if all parents nodes are lesser than its children nodes.
   b. Max-heap - if all parents nodes greater than its children nodes, explained in the above figure-1.

2. In this problem binary heap tree is a binary max-heap tree.
Try solving now

2. Edit Distance

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

You are given two strings 'S' and 'T' of lengths 'N' and 'M' respectively. Find the "Edit Distance" between the strings.

Edit Distance of two strings is the minimum number of steps required to make one string equal to the other. In order to do so, you can perform the following three operations:

1. Delete a character
2. Replace a character with another one
3. Insert a character
Note:
Strings don't contain spaces in between.
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

Which SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Amazon
1516 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
1509 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
771 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
3509 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
52130 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Samsung
11504 views
2 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Google
10216 views
0 comments
0 upvotes