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

SDE - 1

Amazon
upvote
share-icon
5 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures: Leetcode, GFG, CodeChef, Pointers, College course materia, System Design, Dynamic Programming
Tip
Tip

Tip 1 : Practice writing code on a white paper.
Tip 2 : Practice thinking out loud.
Tip 3 : If you don't know the answer to something just say so. Don't waste the interviewers and your time. Chances are he/she will change the question.

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

Tip 1 : Have something on your CV, like project or internship to have a 15-20min discussion.
Tip 2 : Only add bonafide information and don't copy project from your friends/internet.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date31 Jul 2019
Coding problem2

30 MCQs along with 2 coding(easy-medium x 2) questions to be completed in 90 minutes.

Timing: 10AM
Environment: Students from all departments were allowed to sit in the screening test. Around 350 people sat for the examination.

1. Closest Distance Pair

Easy
20m average time
0/40
Asked in companies
SamsungAmazonIntuit

You are given an array containing 'N' points in the plane. The task is to find out the distance of the closest points.

Note :
Where distance between two points (x1, y1) and (x2, y2) is calculated as [(x1 - x2) ^ 2] + [(y1 - y2) ^ 2].
Try solving now

2. Longest Palindromic Substring

Moderate
20m average time
80% success
0/80
Asked in companies
MathworksLivekeeping (An IndiaMART Company)Goldman Sachs

You are given a string 'str' of length 'N'.


Your task is to return the longest palindromic substring. If there are multiple strings, return any.


A substring is a contiguous segment of a string.


For example :
str = "ababc"

The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome. 

There is another palindromic substring of length 3 is "bab". Since starting index of "aba" is less than "bab", so "aba" is the answer.
Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date5 Aug 2019
Coding problem3

This was the 1st f2f round. The interviewer called my name and took me to a separate room and gave me a white paper.

1. Single Element in a Sorted Array

Easy
15m average time
85% success
0/40
Asked in companies
AmazonOlaLenskart.com

You are given a sorted array ‘arr’ of ‘n’ numbers such that every number occurred twice in the array except one, which appears only once.


Return the number that appears once.


Example:
Input: 'arr' = [1,1,2,2,4,5,5]

Output: 4 

Explanation: 
Number 4 only appears once the array.


Note :
Exactly one number in the array 'arr' appears once.


Try solving now

2. Next Greater Element

Easy
10m average time
90% success
0/40
Asked in companies
IBMInfo Edge India (Naukri.com)Amazon

You are given an array 'a' of size 'n'.



The Next Greater Element for an element 'x' is the first element on the right side of 'x' in the array, which is greater than 'x'.


If no greater elements exist to the right of 'x', consider the next greater element as -1.


For example:
Input: 'a' = [7, 12, 1, 20]

Output: NGE = [12, 20, 20, -1]

Explanation: For the given array,

- 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 we consider NGE as -1.
Try solving now

3. Maximum Sum No Larger Than K

Hard
25m average time
60% success
0/120
Asked in companies
DunzoAmazonCIS - Cyber Infrastructure

You are given an ‘N’ x ‘M’ matrix ‘MAT’ and an integer ‘K’. Your task is to find the maximum sum of a rectangle in the matrix which is less than or equal to ‘K’.

For Example:

You are given ‘MAT’= [[1, 2],[3, 4]] and ‘K’ = 8. 

Then the answer will be 7 (the sum of the red rectangle).
Problem approach

He asked me if I know the solution to this and I said yes, this can be solved using Kadane's algorithm. He was satisfied with my answer and didn't ask me any coding related stuffs. He asked some basic questions from resume projects and we were done.

Try solving now
03
Round
Medium
Face to Face
Duration75 minutes
Interview date5 Aug 2019
Coding problem2

I was told by the HR that I have been cleared for the next round and it would begin in sometime. 
This was a discussion based round where the interviewer asked me an open ended question and we were discussing the approaches to solve it.

1. Puzzle

Its was a frog jumping version of Triangle Golf Tee Puzzle.

Problem approach

Tip 1 : Try to figure out the trick.
Tip 2 : Try to analyse and solve the problem from scratch.

2. Palindrome Pairs

Moderate
25m average time
75% success
0/80
Asked in companies
AmazonCIS - Cyber InfrastructureFacebook

You are given a list of ‘N’ words ‘WORDS’. Your task is to return all pairs of the distinct indices (i, j) in ‘WORDS’, such that the concatenation of WORDS[i] and WORDS[j] is a palindrome.

For Example:

You are given ‘WORDS’ = [“cat”, “mat”, “tac”]. Then the answer will be [(0, 2), (2, 0)}, because “cat” + “tac” = “cattac” which is a palindrome and “tac” + “cat” = “taccat” which is also a palindrome.
Try solving now
04
Round
Hard
Face to Face
Duration60 minutes
Interview date5 Aug 2019
Coding problem2

The HR again told me that I have cleared the last round and the next round will start in some time and I will be called soon. The interviewer called my name and took me to a room. We began by introducing ourselves. He asked me some basic CS fundamentals question.

1. Longest Subarray Zero Sum

Moderate
18m average time
85% success
0/80
Asked in companies
OlaPayUAmazon

Given an array arr of length N consisting of positive and negative integers, return the length of the longest subarray whose sum is zero.

Try solving now

2. Merge Two BSTs

Moderate
10m average time
90% success
0/80
Asked in companies
AmazonJosh Technology GroupD.E.Shaw

You are given two binary search trees of integers having ‘N’ and ‘M’ nodes. Return an array that contains elements of both BST in sorted order.


A binary search tree (BST) is a binary tree data structure with 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.


Problem approach

I asked him whether I can use extra space or not and he said no. I realized this would require graph traversal type approach with 2 pointers smartly moving and waiting for the other to complete its traversal. I have him an adhoc approach. He asked me to code it. The code was not exactly correct but somehow he was convinced that the method was right but very complex to implement in pen and paper.

Try solving now
05
Round
Hard
Face to Face
Duration75 minutes
Interview date6 Aug 2019
Coding problem1

This round took place the next day. We were informed that we cleared the 3rd round and this will be the last round - Bar Raiser. A very experience Amazon engineer took this round. He took my resume and asked me about the interview experience. I told him honestly. He asked me some questions related to the internships and projects I did. It was a long 30min conversation where we talked about the challenges faced and the things I learned in the process. He then asked me some theory questions from object oriented programming. I answered all of them except one but that was okay he told me.

Moderate
20m average time
80% success
0/80
Asked in companies
HCL TechnologiesAmazonOracle

You are given an ‘M*N’ Matrix, You need to print all possible paths from its top left corner to the bottom right corner if given that you can either move right i.e from (i,j) to (i,j+1) or down i.e from (i, j) to (i+1, j).

For Example :
1 2 3
4 5 6

For the above 2*3 matrix , possible paths are (1 2 3 6) , (1 2 5 6) , (1 4 5 6).
Note :
You can return the paths in any order.
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 - 1
3 rounds | 5 problems
Interviewed by Amazon
3085 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2295 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Amazon
1593 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
58238 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