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: 4 months
Topics: Data Structures, OOPS, Algorithms, DBMS, OS, Networks
Tip
Tip

Tip 1 : Practice ds and algo
Tip 2 : Be confident
Tip 3 : Speak out loud and Be clear

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

Tip 1 : Mention only what you know
Tip 2 : Having Cp ranks is a plus

Interview rounds

01
Round
Easy
Online Coding Test
Duration2 hour 30 mins
Interview date15 Jun 2020
Coding problem2

Debugging: This section had 7 debugging problems, which consist of code snippets that have some logical error that needs to be rectified.
Reasoning Ability: This section consists of some verbal reasoning questions and some aptitude questions.
Coding: This section consists of 2 coding problems.

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

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

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

The idea is to remove a row or column in each comparison until an element is found. Start searching from the top-right corner of the matrix.

Try solving now

2. Clone Linked List with Random Pointer

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftUrban Company (UrbanClap)Amazon

Given a linked list having two pointers in each node. The first one points to the next node of the list, however, the other pointer is random and can point to any node of the list or null. The task is to create a deep copy of the given linked list and return its head. We will validate whether the linked list is a copy of the original linked list or not.

A deep copy of a Linked List means we do not copy the references of the nodes of the original Linked List rather for each node in the original Linked List, a new node is created.

For example,

example

Random pointers are shown in red and next pointers in black.

Problem approach

Insert a new node after every node with same value
Make a copy
Separate the two lists

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date17 Jun 2020
Coding problem2

Around 30 candidates were shortlisted from my campus and over 150+ candidates were shortlisted from the university, and I was one of them. Then my first round of interviews was scheduled. I was pretty nervous before the interview.

1. Return in Row wave form

Easy
15m average time
80% success
0/40
Asked in companies
AmazonVir SoftechCvent

You are given a 2D array with dimensions ‘N*M’. You need to read the array elements row-wise and return a linear array that stores the elements like a wave i.e the 1st-row elements are stored from left to right, 2nd-row elements are stored from right to left, and so on.

Problem approach

If we make sure that all even positioned (at index 0, 2, 4, ..) elements are greater than their adjacent odd elements, we don’t need to worry about odd positioned element.

Try solving now

2. Construct a strict binary tree

Moderate
25m average time
70% success
0/80
Asked in companies
OlaAmazon

You have been given an array/list of integers, let’s say ‘PRE’, which represents the preorder traversal of a strict binary tree and an array/list ‘TYPENL’ which has only two possible values either ‘L’ or ‘N’ where the value ‘L’ indicates that the corresponding node in Binary Tree is a leaf node and value ‘N’ indicates that the corresponding node is a non-leaf node.

You are supposed to construct a strict binary tree from the given two arrays/lists and return the root node of the constructed binary tree.

NOTE:
A strict binary tree is a tree where each node has either 0 or 2 children.
Problem approach

I used the properties of preorder 
I used Recursion
I used HashMap for optimization

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date17 Jun 2020
Coding problem1

My interviewer introduced himself in the beginning and asked for my introduction.

1. Alien Dictionary.

Hard
46m average time
50% success
0/120
Asked in companies
SprinklrGoogleFacebook

You have been given a sorted (lexical order) dictionary of an alien language.


Write a function that returns the order of characters as a string in the alien language. This dictionary will be given to you as an array of strings called 'dictionary', of size 'N'.


Example :
If the dictionary consists of the following words:-
["caa", "aaa", "aab"], and 'K' is 3.

Then, the order of the alphabet is -
['c', 'a', 'b']
Note:
If the language consists of four letters, the four letters should be the starting four letters of the English language. 

However, their order might differ in the alien language.
Problem approach

Create a graph
Traverse the two strings at a time, for forming an edge
Finally do Topological Sort

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 operator is used for exponentiation in Python?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
3 rounds | 3 problems
Interviewed by Amazon
1388 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 7 problems
Interviewed by Amazon
570 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
575 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
1301 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
13095 views
1 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Microsoft
7619 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Google
5450 views
1 comments
0 upvotes