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

Software Engineer

Amazon
upvote
share-icon
2 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Reasoning
Tip
Tip

Tip 1 : Refer geeks for geeks coding problems
Tip 2 : Practice Coding questions from HackerRank or Leetcode.
Tip 3 : DO atleast 1 project

Application process
Where: Campus
Eligibility: Needs one project in any language
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Mention your skill set like C, Java

Interview rounds

01
Round
Hard
Online Coding Test
Duration60 Minutes
Interview date4 Jan 2022
Coding problem5

- Morning time
- Environment was good.
- No other significant activity
- Interviewer was good

1. Subset Sum

Easy
0/40
Asked in companies
AmazonGoldman SachsSAP Labs

You are given an array 'nums' of ‘n’ integers.


Return all subset sums of 'nums' in a non-decreasing order.


Note:
Here subset sum means sum of all elements of a subset of 'nums'. A subset of 'nums' is an array formed by removing some (possibly zero or all) elements of 'nums'.


For example
Input: 'nums' = [1,2]

Output: 0 1 2 3

Explanation:
Following are the subset sums:
0 (by considering empty subset)
1 
2
1+2 = 3
So, subset sum are [0,1,2,3].
Try solving now

2. Kevin And His Cards

Easy
20m average time
80% success
0/40
Asked in companies
AdobeAmazonZS

Kevin has two sorted packs of cards. The first pack has N cards and the second one has M cards. Every card has an integer written on it. Now, you have to tell two things. First, how many different types of cards does Kevin have with both packs(union). Second, how many types both the packs have in common(intersection).

Note :
Two cards are said to be of different types if they have different numbers written on them.
Try solving now

3. Roots of the tree having minimum height

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

You are given an undirected Tree having 'N' nodes. The nodes are numbered from 1 to 'N'. Your task is to find the sorted list of all such nodes, such that rooting the tree on that node gives the minimum height possible of the given tree.

A tree is a connected acyclic graph. The height of a rooted tree is the maximum value of the distance between the root and all nodes of the tree.

Try solving now

4. Puzzle

A race track has five lanes. You are to find the 3 fastest horses out of a total of 25. How many races would have to be conducted to find the three fastest horses?

Problem approach

Tip 1: Practice only

Answer -
step 1- Conduct 5 horse races with 5 horses in each group. Then, conduct another race with the winners of the said 5 races. The winner is the first fastest horse.

step 2-Then conduct another race with the rest of the 4 horses, and record the 1st and 2nd horses in it. They are the second and third fastest horses.

step 3-This way, you would have found the three fastest horses out of 25.

5. Minimum Time To Visit All Points

Moderate
15m average time
85% success
0/80
Asked in companies
AmazonMorgan Stanleyalibaba

Ninja lives in a 2D plane where each location is represented with integer coordinates ‘[X, Y]’. You are given an array ‘POINTS’ containing ‘N’ such points. Ninja lives at the location ‘POINTS[0]’ and wants to visit all the remaining ‘N-1’ points in the order given by the ‘POINTS’ array. Your task is to help ninja find the minimum time (in seconds) required to visit all the points in the given order (starting from ‘POINTS[0]’).

The ninja can travel according to the following rules :
  • In one second, the ninja can either:
    • Move vertically by one unit, i.e., along the y-direction.
    • Move horizontally by one unit, i.e., along the x-direction.
    • Move diagonally by ‘sqrt(2)’ units, i.e., move one unit horizontally then one unit vertically.
  • The ninja must visit the points in the exact order as they are given the ‘POINTS’ array.
  • The ninja is allowed to pass through points that may be given later in the order, but these points will not be counted as visited.


For Example :
‘POINTS = [ [3, 1], [-1, 3], [2, 0] ]’, ‘N = 3’

Example

The path with minimum time is: ‘[3,1] -> [2,2] -> [1,3] - > [0,3] -> [-1,3] -> [0,2] -> [1,1] -> [2,0]’.

Time taken from [3,1] to [-1,3] = 4 seconds.
Time taken from [-1,3] to [2,0] = 3 seconds.

Total time = 7 seconds. Thus, you should return ‘7’ as the answer.
Try solving now
02
Round
Medium
HR Round
Duration30 Minutes
Interview date21 Jan 2022
Coding problem1

- Morning time
- Environment was good.
- No
- Interviewer was not soo good

1. Basic HR Questions

- Tell me about yourself 

- What did you like most about the job description? 

- What experience do you have that would be relevant to this role? 

- Why are you leaving your current job?

Problem approach

Tip 1 : Give proper answer
Tip 2 : Give valid answers
Tip 3 : Take time and communicate well with HR Pannel

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
Software Engineer
3 rounds | 5 problems
Interviewed by Amazon
3674 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
0 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
2806 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 15 problems
Interviewed by Amazon
1714 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7977 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
10148 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by Samsung
2936 views
0 comments
0 upvotes