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

SDE - 1

Amazon
upvote
share-icon
2 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: C, Java, OOPS, Algorithms, Data Structures
Tip
Tip

Tip 1 : Prepare as per your skills like C, Java
Tip 2 : Focus on Projects and Algorithms

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

Tip 1 : Highlight your achievements and goals
Tip 2 : Highlight your skill set

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 Minutes
Interview date16 Jun 2022
Coding problem5

- In Afternoon 
- Environment was good.
- No
- Interviewer also good

1. Sort Array

Moderate
15m average time
85% success
0/80
Asked in companies
HSBCHCL TechnologiesOYO

You are given an array consisting of 'N' positive integers where each integer is either 0 or 1 or 2. Your task is to sort the given array in non-decreasing order.

Note :
1. The array consists of only 3 distinct integers 0, 1, 2.
2. The array is non-empty.
Problem approach

step 1 - We can use Array.sort() method to sort an Array as given below-
step 2 - Int Result [] = {15, 8, 10, 7}
step 3 - Arrays.sort(Result);
step 4 - System.out.printIn(Arrays.toString(Result));//[7, 8, 10, 15]

Try solving now

2. Split the given array into K sub-arrays

Hard
15m average time
85% success
0/120
Asked in companies
AmazonTrilogy InnovationsD.E.Shaw

You’re given an array 'arr' of size 'n' and an integer 'k'.

Your task is to split 'arr' into 'k' sub-arrays such that the maximum sum achieved from the 'k' subarrays formed must be the minimum possible.

A subarray is a contiguous part of the array.

Return the minimum possible value of the maximum sum obtained after splitting the array into 'k' partitions.


Example:
Input: ‘arr’ = [1, 1, 2] and ‘k’ = 2 

Output: 2

Explanation: If we want to make two subarrays, there are two possibilities: [[1], [1, 2]] and [[1, 1], [2]]. We can see that the maximum sum of any subarray is minimized in the second case. Hence, the answer is 2, which is the maximum sum of any subarray in [[1, 1], [2]].


Problem approach

step 1- Check all the possible partitions of the array and take the one which gives the maximum profit
step 2- Possible partitions are as follows [- (4) + (3 + 2 + 3), - (4 + 3) + (2 + 3), - (4 + 3 + 2) + (3)]
step 3- The profits of these possible partitions are as follows [8 - 4, 5 - 7, 3 - 9] = [4, -2, -6] hence the answer is 4.

Try solving now

3. Puzzle

If a giraffe has two eyes, a monkey has two eyes, and an elephant has two eyes, how many eyes do we have?

A) 3 B) 4
C) 1 D) 2

Problem approach

Tip 1 : Practice puzzles online on any site
Note : Answer is B

4. DBMS Question

he easiest way in which we can transfer control is when the old backup site sends __________ to the old primary.

a. Redo logs
b. Primary Logs
c. Undo Logs
d. All of the above

Problem approach

Tip 1 : Hands on DBMS concepts like Deadlock, Memory, ALU concepts
Note : Answer is b

5. Find the minimum cost to reach destination using a train

Moderate
20m average time
80% success
0/80
Asked in companies
GrowwDeutsche BankAmazon

There are ‘N’ stations on the route of a train. The train goes from station 0 to ‘N’ - 1. The ticket cost for all pairs of stations (i, j) is given where ‘j’ is greater than ‘i’. Your task is to find the minimum cost to reach the Nth station.

Note:

Cost of entries where j < i  will be represented as INT_MAX VALUE which is 10000 in the price matrix.
Example:
If ‘N’ = 3

'PRICE[3][3]' = {{0, 15, 80,},
               {INF, 0, 40},
               {INF, INF, 0}};

First, go from 1st station to 2nd at 15 costs, then go from 2nd to 3rd at 40. 15 + 40 = 55 is the total cost.It is cheaper than going directly from station 1 to station 3 as it would have cost 80.

The output will be 55.
Problem approach

step 1-
N = 5
M = 2
A = [ [1, 3, 5], [2, 5, 10] ]

step 2-
First, take the first train from city 1 and reach city 2 at a cost of 5.
Then take the second train from city 2 to city 5 at a cost of 10.
Thus the total cost to travel from city 1 to 5 is 5+10=15. 
Hence, the answer is 15.

Try solving now
02
Round
Easy
HR Round
Duration30 minutes
Interview date1 Jan 2019
Coding problem1

- Evening time
- Environment was good.
- No
- Interview was good

1. Basic HR Questions

1> What do you know about our company’s product/services? 

2> Describe the workplace where you’ll be most happy and productive. 

3> Tell me about your experiences in life?

Problem approach

Tip 1 : Communication matters.
Tip 2 : Speak with thoughtful thoughts

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