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

SDE - 1

Amazon
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey in February 2020. Firstly, I solved approximately 50-60 questions on the coding platform to brush up on my programming syntax and warm up. Then, I began coding on another coding platforms simultaneously. I picked each data structure topic and started solving questions from easy to medium level. I first focused on LinkedLists, coding approximately 40 questions on that topic, and then moved on to Hashing, Stacks, Queues, and Trees. I solved very limited questions on Graphs (only BFS, DFS, and topological sort-based questions). For Dynamic Programming, I solved around 20-25 questions, mostly covering generic problems like LCS and Knapsack. My approach was to spend around 10-15 minutes initially trying to build the solution. If I was unable to build it, I would refer to posts or YouTube videos to understand the solution. Afterwards, I kept the question on my to-do list and, the next day or the following day, I would code the approach I had seen in the post or video.
Application story
I got this opportunity through off-campus placements. I prepare moderate data structures like linked lists, trees, graphs, and arrays.
Why selected/rejected for the role?
Being at a moderate level of coding and having a deep understanding of programming skills, I was able to solve the questions asked during the selection process. Also, good communication skills are more than required. However, due to my problem-handling skills, I think I got rejected. It seemed the interviewer was looking for the STAR method to solve a problem.
Preparation
Duration: 6.5 months
Topics: Topics: Data Structures, OOPS, Trees, Graphs, LinkedList, Arrays, Queue, Stack, Hashmap, Searching, Sorting, Recursion, Strings
Tip
Tip

Tip 1 : Practice At least 20 questions from each topic like LinkedList, Graphs, Trees, and HashMap and all medium data structures.
Tip 2 : Try to complete the medium code in 30 mins of durations.
Tip 3 : Prepare one coding language in which you are more comfortable with.

Application process
Where: Company Website
Eligibility: NA
Resume Tip
Resume tip

Tip 1 : Have some projects on your resume.
Tip 2 : Never put false things.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 mins
Interview date5 Sep 2021
Coding problem2

1. Best Time to Buy and Sell Stock II

Moderate
22m average time
0/80
Asked in companies
Goldman SachsPhonePeLinkedIn

You have been given stock values/prices for N number of days. Every i-th day signifies the price of a stock on that day. Your task is to find the maximum profit which you can make by buying and selling the stocks.

 Note :
You may make as many transactions as you want but can not have more than one transaction at a time i.e, if you have the stock, you need to sell it first, and then only you can buy it again.
Problem approach

using stack

Try solving now

2. Valid Parentheses

Easy
10m average time
80% success
0/40
Asked in companies
AmazonIntuitOracle

You're given a string 'S' consisting of "{", "}", "(", ")", "[" and "]" .


Return true if the given string 'S' is balanced, else return false.


For example:
'S' = "{}()".

There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Problem approach

Using stack, this problem can be easily solved.

Try solving now
02
Round
Medium
Online Coding Test
Duration60 mins
Interview date14 Sep 2021
Coding problem1

It was an interview round, one-on-one.

1. Design Add and Search Words Data Structure

Design a data structure that supports adding new words and finding if a string matches any previously added string. Implement the WordDictionary class: WordDictionary() initializes the object. void addWord(word) adds a word to the data structure, which can be matched later. bool search(word) returns true if there is any string in the data structure that matches the word, or false otherwise. The word may contain dots '.' where dots can be matched with any letter.

Problem approach

To solve this problem, you must have an idea of Trie data structures.

03
Round
Easy
Online Coding Test
Duration60 mins
Interview date14 Sep 2021
Coding problem2

2nd interview was on the same day.

1. Merge Two Sorted Linked Lists

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

You are given two sorted linked lists. You have to merge them to produce a combined sorted linked list. You need to return the head of the final linked list.

Note:

The given linked lists may or may not be null.

For example:

If the first list is: 1 -> 4 -> 5 -> NULL and the second list is: 2 -> 3 -> 5 -> NULL

The final list would be: 1 -> 2 -> 3 -> 4 -> 5 -> 5 -> NULL
Problem approach

This can be solved using the merge sort sorting algorithm.

Try solving now

2. Reverse Nodes in k-Group

Hard
56m average time
30% success
0/120
Asked in companies
SAP LabsHikeAdobe

You are given a Singly Linked List of integers and an integer array 'B' of size 'N'. Each element in the array 'B' represents a block size. Modify the linked list by reversing the nodes in each block whose sizes are given by the array 'B'.

Note:
1. If you encounter a situation when 'B[i]' is greater than the number of remaining nodes in the list, then simply reverse the remaining nodes as a block and ignore all the block sizes from 'B[i]'. 

2. All block sizes are contiguous i.e. suppose that block 'B[i]' ends at a node cur, then the block 'B[i+1]' starts from the node just after the node cur.
Example
Linked list: 1->2->3->4->5
Array B: 3 3 5

Output: 3->2->1->5->4

We reverse the first block of size 3 and then move to block 2. Now, since the number of nodes remaining in the list (2) is less than the block size (3), we reverse the remaining nodes (4 and 5) as a block and ignore all the block sizes that follow.
Problem approach

This problem can be solved recursively.

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 - 1
3 rounds | 5 problems
Interviewed by Amazon
0 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
2294 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