Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Amazon interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

Amazon
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Dynamic Programming, Greedy Techniques, Data Structures, OOPs, DBMS, Graph Theory
Tip
Tip

Tip 1 : Prepare OS,DBMS,OOPs too
Tip 2 : Mention atleast one project or past work experience in your resume
Tip 3 : Try maintaining 8+ CGPA as sometimes shortlist is done based on CGPA
Tip 4 : Try past interview questions from Leetcode,Interviewbit.

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

Tip 1 : Try to Keep Resume 1 Pager 
Tip 2 : Have atleast one project or past work experience mentioned
Tip 3 : Don't put false things on Resume as questions are asked in detail from Resume

Interview rounds

01
Round
Medium
Online Coding Test
Duration45 minutes
Interview date10 Sep 2020
Coding problem2

The first Round was held on Hackerrank and the questions were of medium difficulty based on Data Structures and Algorithms.
The time of test was 1:00 PM and it was of 45 minutes with 2 coding questions to be solved.

1. Merge overlapping intervals

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

Given 'N' number of intervals, where each interval contains two integers denoting the boundaries of the interval. The task is to merge all the overlapping intervals and return the list of merged intervals sorted in ascending order.

Two intervals will be considered to be overlapping if the starting integer of one interval is less than or equal to the finishing integer of another interval, and greater than or equal to the starting integer of that interval.

Example:
for the given 5 intervals - [1,4], [3,5], [6,8], [10,12], [8,9].
Since intervals [1,4] and [3,5] overlap with each other, we will merge them into a single interval as [1,5].

Similarly [6,8] and [8,9] overlaps, we merge them into [6,9].

Interval [10,12] does not overlap with any interval.

Final List after merging overlapping intervals: [1,5], [6,9], [10,12]
Try solving now

2. Josephus

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

‘N’ people are standing in a circle numbered from ‘1’ to ‘N’ in clockwise order. First, the person numbered 1 will proceed in a clockwise direction and will skip K-1 persons including itself and will kill a Kth person. Now (K+1)th person from 1 will start and will kill the Kth person from itself.

You have to find the position of the last person surviving with respect to initial numbering.

Note:
A person can also kill himself.
Try solving now
02
Round
Medium
Coding Test - Pen and paper
Duration75 minutes
Interview date14 Sep 2020
Coding problem2

A google Doc was shared with us and we were supposed to write code there. 
Use of IDEs was not allowed so we had to write correct code on Google Docs which was later checked by them through online IDEs.
The Interviewer were friendly and observative and helped us through code if we made some silly error.

1. Largest rectangle in a histogram

Hard
25m average time
75% success
0/120
Asked in companies
CIS - Cyber InfrastructureSnapdealAmerican Express

You have been given an array/list 'HEIGHTS' of length ‘N. 'HEIGHTS' represents the histogram and each element of 'HEIGHTS' represents the height of the histogram bar. Consider that the width of each histogram is 1.

You are supposed to return the area of the largest rectangle possible in the given histogram.

For example :
In the below histogram where array/list elements are {2, 1, 5, 6, 2, 3}.

alt text

The area of largest rectangle possible in the given histogram is 10.
Try solving now

2. Boundary Traversal

Hard
20m average time
85% success
0/120
Asked in companies
MicrosofteBaySalesforce

You are given a binary tree having 'n' nodes.


The boundary nodes of a binary tree include the nodes from the left and right boundaries and the leaf nodes, each node considered once.


Figure out the boundary nodes of this binary tree in an Anti-Clockwise direction starting from the root node.


Example :
Input: Consider the binary tree A as shown in the figure:

alt text

Output: [10, 5, 3, 7, 18, 25, 20]

Explanation: As shown in the figure

The nodes on the left boundary are [10, 5, 3]

The nodes on the right boundary are [10, 20, 25]

The leaf nodes are [3, 7, 18, 25].

Please note that nodes 3 and 25 appear in two places but are considered once.
Try solving now
03
Round
Medium
Face to Face
Duration60 minutes
Interview date16 Sep 2020
Coding problem2

The face to face round was held on Google Meet where initially Interviewer asked a DS/Algo problem and then Later Manager Joined and asked about our resume projects in detail.
The time was 10:00 AM

1. Maximum sum rectangle

Hard
25m average time
70% success
0/120
Asked in companies
AmazonGoldman SachsHexaware Technologies

You are given an M X N matrix of integers ARR. Your task is to find the maximum sum rectangle.

Maximum sum rectangle is a rectangle with the maximum value for the sum of integers present within its boundary, considering all the rectangles that can be formed from the elements of that matrix.

A rectangle is a 2-D polygon with opposite sides parallel and equal to each other.

For example:
Consider following matrix:

 1  2 -1 -4 -20
-8 -3  4  2   1
 3  8  10 1   3
-4 -1  1  7  -6

The rectangle (1,1) to (3,3) is the rectangle with the maximum sum, i.e. 29.

 1   2 -1 -4  -20
-8 |-3  4  2 |  1
 3 | 8  10 1 |  3
-4 |-1  1  7 | -6
Try solving now

2. Rotated Array

Moderate
10m average time
90% success
0/80
Asked in companies
OlaPaytm (One97 Communications Limited)Amazon

You are given an array 'arr' of size 'n' having unique elements that has been sorted in ascending order and rotated between 1 and 'n' times which is unknown.


The rotation involves shifting every element to the right, with the last element moving to the first position. For example, if 'arr' = [1, 2, 3, 4] was rotated one time, it would become [4, 1, 2, 3].


Your task is to find the minimum number in this array.


Note :
All the elements in the array are distinct. 


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

Output: 1

Explanation: The original array was [1,2,3,4,5] and it was rotated 3 times.


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 is a DDL command in SQL?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SDE - Intern
3 rounds | 3 problems
Interviewed by Amazon
1167 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 7 problems
Interviewed by Amazon
406 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
418 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
615 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
12330 views
1 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Microsoft
7424 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Google
5248 views
1 comments
0 upvotes