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

SDE - Intern

Amazon
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Data structures and Algorithms, Computer fundamentals subjects. Basics of every skill that you have written in your resume and also knowledge of concepts related to your projects. You should know whatever you have written in your resume.
Tip
Tip

Don’t create panic in any case in the interview , as even if you are not selected you will learn a lot from your interview experience and perform well in the future. Also I would recommend you Coding Ninjas as according to me it is a good platform to learn basic coding concepts and to practice coding.

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

Write whatever you are sure about and have actually done that. CGPA plays a good role but not a complete role as it is just eligibility criteria for some companies. Have at least 1 or 2 good projects from which you know everything involved in the project.

Interview rounds

01
Round
Easy
Video Call
Duration45 Minutes
Interview date11 Mar 2022
Coding problem2

1. Occurrence of X in a Sorted Array

Moderate
26m average time
0/80
Asked in companies
DirectiSAP LabsAmazon

You have been given a sorted array/list of integers 'arr' of size 'n' and an integer 'x'.


Find the total number of occurrences of 'x' in the array/list.


Example:
Input: 'n' = 7, 'x' = 3
'arr' = [1, 1, 1, 2, 2, 3, 3]

Output: 2

Explanation: Total occurrences of '3' in the array 'arr' is 2.


Problem approach

Count number of occurrences (or frequency) in a sorted array

Given a sorted array arr[] and a number x, write a function that counts the occurrences of x in arr[]. 

Examples:

Input: arr[] = {1, 1, 2, 2, 2, 2, 3,}, x = 2

Output: 4 
2 occurs 4 times in arr[]

Try solving now

2. Maximum Subarray Sum

Moderate
25m average time
75% success
0/80
Asked in companies
CultfitPayPalWalmart

Given an array of numbers, find the maximum sum of any contiguous subarray of the array.


For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would take elements 42, 14, -5, and 86.


Given the array [-5, -1, -8, -9], the maximum sum would be -1.


Follow up: Do this in O(N) time.

Problem approach

Given an array and an integer K, find the maximum for each and every contiguous subarray of size k.

Examples :

Input: arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6}, K = 3 

Output: 3 3 4 5 5 5 6

Explanation: 

Maximum of 1, 2, 3 is 3

Maximum of 2, 3, 1 is 3

Maximum of 3, 1, 4 is 4

Maximum of 1, 4, 5 is 5

Maximum of 4, 5, 2 is 5 

Maximum of 5, 2, 3 is 5

Maximum of 2, 3, 6 is 6

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date11 Mar 2022
Coding problem2

1. Convert given number to words

Moderate
24m average time
0/80
Asked in companies
OracleCoinbaseAmazon

You have been given an integer 'num'. Write a function to calculate descriptive word form of the number.

Use the Indian standard unit of numbering.

Example :
If the given input is 62, the output should be 'Sixty two' (without quotes).

Similarly, if the input is 1000000, the output should be 'Ten lakh'.
Problem approach

Convert a given number into words for news reading by a device.

Example : 

If the given input is 62, the output should be 'Sixty two' (without quotes)

Try solving now

2. Converting min heap to a max heap

Moderate
25m average time
75% success
0/80
Asked in companies
AmazonSAP LabsOLX Group

You are given an array of size ‘N’ which is an array representation of min-heap.


You need to convert this min-heap array representation to a max-heap array representation. Return the max-heap array representation.


For Example
Corresponding to given min heap : [1,2,3,6,7,8]

It can be converted to the following max heap: [8,7,3,6,2,1]

Problem approach

Converting a min heap to a max heap. There can be multiple max heaps possible. Any max heap will be good.

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
2162 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
4914 views
2 comments
0 upvotes