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

SDE - Intern

Amazon
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Journey
I started my competitive programming journey in my first year of college on a coding platform to build my implementation skills and gain confidence, eventually reaching a 6-star rating. This experience encouraged me to move on to other coding platforms, where I participated in daily contests and progressed from solving 800-rated to 1500-rated problems, focusing on specific topics like binary search and math. After gaining enough confidence in competitive programming, I simultaneously began preparing topics like dynamic programming, graphs, trees, and linked lists to start learning data structures and algorithms (DSA). At Amazon, the main focus is on DSA questions. This was my strategy to crack the SDE intern job at Amazon.
Application story
Amazon came to our college campus to hire interns. I applied for that opportunity. First, there was a coding round, and after that, the shortlisted students moved on to the interview round.
Why selected/rejected for the role?
The interviewer asked me two DSA questions, and I was able to explain all of them clearly. Overall, if we meet the interviewer's expectations, we will definitely get selected.
Preparation
Duration: 12 Months
Topics: Data Structures, OOPS, Algorithms, Dynamic Programming, Trees, Graph, Networking
Tip
Tip

Tip 1: Participate in daily contests on coding platforms. They are very helpful.
Tip 2: Complete at least two projects—one focused on the frontend and the other on the backend.

Application process
Where: Campus
Eligibility: Above 7 CGPA, (Salary Package: 13.2 LPA)
Resume Tip
Resume tip

Tip 1: Mention only the things in your resume that you are sure about and have enough confidence in.
Tip 2: Include short and precise points in your resume, and do not include false information.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date5 Aug 2023
Coding problem2

1. Most Frequent Word

Easy
15m average time
85% success
0/40
Asked in companies
McAfeeAdobeCognizant

You are given two strings 'A' and 'B' of words. Your task is to find out the most frequent and lexicographically smallest word in string 'A', which is not present in string 'B'. If no such word is present in 'A', then return -1.

Note:

1. A word is a sequence of one or more lowercase characters.

2. Words are separated by a single whitespace character.
Example:
For the given string 'A' = “coding ninjas coding ninjas” and 'B' = “data structures and algorithms”, so both the word 'coding' and 'ninjas' are not present in string 'B' and occur two times each, but the word “coding” is lexicographically smaller than the word “ninjas”. So the answer is “coding”.
Problem approach

Brute force : The idea is to run a loop for each word and count the frequency of the word using a nested loop, and then print the word with highest frequency.

Optimized approach: Take a map and then run a loop and store each word into a map and then iterate into the map to check the frequency of each word.

Try solving now

2. Second Most Repeated Word

Easy
25m average time
70% success
0/40
Asked in companies
AdobeFacebookVisa

You are given an array of strings ‘ARR’. You have to find out the second most repeated word in the array ‘ARR’. It is guaranteed every string occurs a unique number of times in the array. If there is only one unique string in the array, return an empty string.

Example:-
N = 5
S = [‘aaa’, ‘bbb’, ‘ccc’, ‘aaa’, ‘bbb’, ‘aaa’]

ANSWER:- The answer should be ‘bbb’ as it is repeated 2 times and is the second most repeated word in the array [after the word ‘aaa’ which is repeated 3 times].
Problem approach

Count the frequencies of each word using the Counter function.
Traverse the frequency dictionary.
Check which word has a frequency of 2. If so, increase the count.
Print the count.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date12 Aug 2023
Coding problem1

1. House Robber

Moderate
26m average time
0/80
Asked in companies
CognizantTata Consultancy Services (TCS)Paytm (One97 Communications Limited)

A thief wants to loot houses. He knows the amount of money in each house. He cannot loot two consecutive houses. Find the maximum amount of money he can loot.

Problem approach

Step 1: I thought of a brute-force solution using maps and discussed it with the interviewer, but it was not good enough.
Step 2: The interviewer asked me to optimize the solution.
Step 3: I then provided a solution using recursion, but it still wasn’t good enough.
Step 4: The interviewer again asked me to optimize the solution.
Step 5: I then provided a solution using memoization, but the interviewer still asked me to optimize it further.
Step 6: Finally, I provided a solution using a top-down approach, and the interviewer was happy.

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 SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
3 rounds | 3 problems
Interviewed by Amazon
1427 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 7 problems
Interviewed by Amazon
589 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Amazon
597 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
1408 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
13230 views
1 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Microsoft
7646 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Google
5474 views
1 comments
0 upvotes