Amazon last 6 months DSA question compilation

amazon logo
amazon
SDE-2Rejected
December 18, 202529 reads

Summary

Applied for SDE-2 role at Amazon. Focused on DSA preparation but faced challenges in LLD round due to lack of backend system design knowledge. Overall, the interview process was intense and provided a comprehensive overview of the company's technical rigor.

Full Experience

I recently gave an SDE-2 interview at Amazon, and this is the list of questions I found on LeetCode Discuss that I used for preparation. Unfortunately, I was rejected in the LLD round because the interviewer focused on backend LLD, while I had prepared only for mobile development LLD. I hope this will be useful for everyone who has an interview scheduled.

Interview Questions (16)

Q1
Bus Routes
Data Structures & AlgorithmsHard

Given a list of bus routes where each route has multiple stops, find the minimum number of buses to take to get from a source to a destination stop.

Q2
Course Schedule II
Data Structures & AlgorithmsMedium

Given a list of courses and their prerequisites, find an order to take the courses such that all prerequisites are satisfied.

Q3
Detect Cycles In 2D Grid
Data Structures & AlgorithmsHard

Determine if there is a cycle in a 2D grid where each cell represents a node connected to its adjacent cells.

Q4
Evaluate Division
Data Structures & AlgorithmsMedium

Given equations in the form of a/b = k, determine the value of a given query like a/c.

Q5
Find Eventual Safe States
Data Structures & AlgorithmsHard

Determine which nodes in a directed graph are safe states, meaning there is no cycle and no path leads to a cycle.

Q6
Keys And Rooms
Data Structures & AlgorithmsMedium

Determine if all rooms in a building can be unlocked starting from room 0, given that each room contains keys to other rooms.

Q7
Max Consecutive Ones III
Sliding WindowMedium

Find the maximum number of consecutive 1s in a binary array you can get by flipping at most k 0s to 1s.

Q8
Minimum Operations To Reduce X To Zero
Sliding WindowHard

Find the minimum number of operations to reduce a number X to zero by either subtracting a number from the array or subtracting 1 from X.

Q9
Magnetic Force Between Two Balls
Binary SearchHard

Calculate the maximum possible minimum distance between two balls placed in a line of positions, given certain constraints on their placement.

Q10
Search In Rotated Sorted Array
Binary SearchHard

Find the index of a target element in a sorted array that has been rotated at some pivot point.

Q11
Longest Valid Parentheses
StackHard

Find the length of the longest valid parentheses substring in a given string.

Q12
Remove K Digits
StackMedium

Remove k digits from a number represented as a string to make the resulting number as small as possible.

Q13
Best Time To Buy And Sell Stock II
GreedyEasy

Find the maximum profit that can be achieved by buying and selling stocks on different days, with the constraint that you can only hold one stock at a time.

Q14
Merge K Sorted Lists
Linked ListHard

Merge k sorted linked lists into one sorted list.

Q15
Integer To English Words
Math & GeometryHard

Convert an integer to its English words representation.

Q16
Merge Intervals
IntervalsHard

Merge overlapping intervals in a list of intervals.

Preparation Tips

Prepared extensively for DSA topics, focusing on graph algorithms, system design, arrays, trees, dynamic programming, and other key areas. Used LeetCode Discuss to compile a list of problems for targeted practice.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!