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
Journey
I was admitted to PSIT Kanpur College in the computer science stream. This college is renowned and well-known. My seniors advised me to practice DSA from the very start of B.Tech, but I did not take that seriously. Honestly speaking, I regret not taking their advice, and at the end of my second year, I started coding. I had to increase my practice hours because I started late.
Application story
I got to know about this opening through a LinkedIn post. I applied to the post and looked at some important questions for Microsoft and started practicing for that. After a few days, I got a mail that I will be having an assessment test after which the final HR round will take place.
Why selected/rejected for the role?
I was confident throughout the entire interview process. Actually, I worked a lot on my communication skills, and I think they were the main reasons I passed the selection process.
Preparation
Duration: 2 months
Topics: Data Structures and Algorithms, OOPS, System Design, DBMS, Operating System, Pointers, Hashing
Tip
Tip

Tip 1 : Practice as much DSA questions as from coding platforms.
Tip 2 : Do at least 3 projects one should be major, if it's in web dev, it would be beneficial.
Tip 3 : Should be good in communication skills

Application process
Where: Campus
Eligibility: 6.5
Resume Tip
Resume tip

Tip 1 : Not more than 1 page.
Tip 2 : Have at least 3 projects with some achievements in coding contests, and your coding handle should be mentioned like any coding platforms on which you have practiced it.
Tip 3 : Try to keep only those things in resume in which you find yourself comfortable with.

Interview rounds

01
Round
Hard
Online Coding Test
Duration90 mins
Interview date1 Dec 2022
Coding problem2

This round was scheduled for the evening hours, and all the participants were required to fill out a form that was shared 2 days prior to the test date. This form was filled out, probably for security reasons and to ensure that no disinterested participant took the test.

1. Validate Binary Tree Nodes

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

You are given ‘N’ binary tree nodes numbered from 0 to N - 1 where node ‘i’ has two children LEFT_CHILD[i] and RIGHT_CODE[i]. Return ‘True’ if and only if all the given nodes form exactly one valid binary tree. If node ‘i’ has no left child then 'LEFT_CHILD[i]' will equal -1, similarly for the right child.

Example:

Let’s say we have n=4 nodes, 'LEFT_CHILD' = {1, -1, 3, -1} and 
RIGHT_CHILD = {2, -1, -1, -1}. So the resulting tree will look like this:

It will return True as there is only one valid binary tree and each node has only one parent and there is only one root.
Problem approach

The idea is to, for each node, check if the maximum value in the left subtree is smaller than the node and if the minimum value in the right subtree is greater than the node.

Try solving now

2. Longest Palindromic Subsequence

Hard
45m average time
50% success
0/120
Asked in companies
QualcommHikeSAP Labs

You have been given a string ‘A’ consisting of lower case English letters. Your task is to find the length of the longest palindromic subsequence in ‘A’.

A subsequence is a sequence generated from a string after deleting some or no characters of the string without changing the order of the remaining string characters. (i.e. “ace” is a subsequence of “abcde” while “aec” is not).

A string is said to be palindrome if the reverse of the string is the same as the actual string. For example, “abba” is a palindrome, but “abbc” is not a palindrome.

Problem approach

Applied Dynamic Programming concept to solve this problem.

Try solving now
02
Round
Medium
HR Round
Duration40 mins
Interview date1 Dec 2022
Coding problem2

There was only one female interviewer for this round. She continuously interacted with me and was giving me some good situational problems that were not very easy to answer. Basically, those were open-minded questions which can be answered both ways and that's why I found it quite hard as per my nature but at the end things went well for me.

1. Puzzle

There are 5 lanes on a racetrack. One needs to find out the 3 fastest horses among total of 25. Find out the minimum number of races to be conducted in order to determine the fastest three.

Problem approach

The approach entails conducting 5 races, with each race group involving 5 horses. In the ensuing step, a sixth race is conducted between the winners of the first 5 races to determine the 3 fastest horses (marked A1, B1, and C1). The seventh race is conducted between horses B1, C1, the second and third horses from A1’s group (A2, A3), and the second horse from B1’s group (B2). The horses that finish 1st and 2nd in the seventh race are actually the 2nd and 3rd fastest horses among all the horses.

2. Puzzle

Two trains, separated by a distance of 80 km, are running towards each other on the same track at a speed of 40 km/h. A bird takes flight from train X and flies towards train Y at a constant speed of 100 km/h. Once it reaches train Y, it turns and starts flying back toward train X. The bird keeps flying back and forth until both trains collide. Determine the distance traveled by the bird.

Problem approach

Velocity of approach for two trains = (40+40)km/hr

Time taken for the trains to collide = 80km/80km/hr = 1hour

The total distance travelled by the bird = 100km/hr * 1hr = 100km

Through this puzzle, the interviewer is testing your approach. Consider yourself rejected if the approach you took involves calculating distance from X to Y, and then Y to X, and so on.


Note: Basically, it's better if you have seen some puzzles before any HR round since, they will give you an idea of what kind of problem you may encounter and then you can ace any difficult-to-difficult HR interview.

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
2163 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
15500 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
4915 views
2 comments
0 upvotes