Amazon last 6 months DSA question compilation

amazon logo
amazon
· SDE-2· Rejected
December 18, 2025 · 132 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)

1.

Bus Routes

Data Structures & Algorithms·Hard

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.

2.

Course Schedule II

Data Structures & Algorithms·Medium

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

3.

Detect Cycles In 2D Grid

Data Structures & Algorithms·Hard

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

4.

Evaluate Division

Data Structures & Algorithms·Medium

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

5.

Find Eventual Safe States

Data Structures & Algorithms·Hard

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

6.

Keys And Rooms

Data Structures & Algorithms·Medium

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

7.

Max Consecutive Ones III

Sliding Window·Medium

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

8.

Minimum Operations To Reduce X To Zero

Sliding Window·Hard

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.

9.

Magnetic Force Between Two Balls

Binary Search·Hard

Calculate 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

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

11.

Longest Valid Parentheses

Stack·Hard

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

12.

Remove K Digits

Stack·Medium

Remove 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

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.

14.

Merge K Sorted Lists

Linked List·Hard

Merge k sorted linked lists into one sorted list.

15.

Integer To English Words

Math & Geometry·Hard

Convert an integer to its English words representation.

16.

Merge Intervals

Intervals·Hard

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!