Amazon last 6 months DSA question compilation
- Result
- Rejected
- Posted
- 18 Dec 2025
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.
How it went
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.
Questions asked (16)
- 01
Bus Routes
Data Structures & Algorithms · Hard
Open the problemGiven 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.
- 02
Course Schedule II
Data Structures & Algorithms · Medium
Open the problemGiven a list of courses and their prerequisites, find an order to take the courses such that all prerequisites are satisfied.
- 03
Detect Cycles In 2D Grid
Data Structures & Algorithms · Hard
Open the problemDetermine if there is a cycle in a 2D grid where each cell represents a node connected to its adjacent cells.
- 04
Evaluate Division
Data Structures & Algorithms · Medium
Open the problemGiven equations in the form of a/b = k, determine the value of a given query like a/c.
- 05
Find Eventual Safe States
Data Structures & Algorithms · Hard
Open the problemDetermine which nodes in a directed graph are safe states, meaning there is no cycle and no path leads to a cycle.
- 06
Keys And Rooms
Data Structures & Algorithms · Medium
Open the problemDetermine if all rooms in a building can be unlocked starting from room 0, given that each room contains keys to other rooms.
- 07
Max Consecutive Ones III
Sliding Window · Medium
Open the problemFind the maximum number of consecutive 1s in a binary array you can get by flipping at most k 0s to 1s.
- 08
Minimum Operations To Reduce X To Zero
Sliding Window · Hard
Open the problemFind 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.
- 09
Magnetic Force Between Two Balls
Binary Search · Hard
Open the problemCalculate the maximum possible minimum distance between two balls placed in a line of positions, given certain constraints on their placement.
- 10
Search In Rotated Sorted Array
Binary Search · Hard
Open the problemFind the index of a target element in a sorted array that has been rotated at some pivot point.
- 11
Longest Valid Parentheses
Stack · Hard
Open the problemFind the length of the longest valid parentheses substring in a given string.
- 12
Remove K Digits
Stack · Medium
Open the problemRemove k digits from a number represented as a string to make the resulting number as small as possible.
- 13
Best Time To Buy And Sell Stock II
Greedy · Easy
Open the problemFind 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.
- 14
Merge K Sorted Lists
Linked List · Hard
Open the problemMerge k sorted linked lists into one sorted list.
- 15
Integer To English Words
Math & Geometry · Hard
Open the problemConvert an integer to its English words representation.
- 16
How they prepared
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.