DSA interview prep
Work through 30 ranked LeetCode problems drawn from 10 company interview lists.
Your progress
0 / 30- Easy 0 / 8
- Medium 0 / 18
- Hard 0 / 4
Solved problems are saved in this browser.
Ranked problems
30 problems| Solved | Problem | Difficulty | Company lists |
|---|---|---|---|
01Two Sum
Hash tablesFind the indices of two different elements in an array whose values add up to a given target. On the Amazon, Google, Microsoft, Meta, Samsung, Tekion, IBM, Oracle, J.P. Morgan, Morgan Stanley lists. Try Reveal the indices
|
Easy | ||
Sliding windowFind the length of the longest contiguous stretch of a string in which no character appears twice. On the Amazon, Google, Microsoft, Meta, Tekion, IBM, Oracle, J.P. Morgan, Morgan Stanley lists. |
Medium | ||
ArraysGiven daily prices, find the best profit from buying once and selling on a later day. Return zero if no trade makes money. On the Amazon, Google, Microsoft, Meta, IBM, J.P. Morgan, Morgan Stanley lists. |
Easy | ||
Two pointersGiven a row of unit-width bars of different heights, calculate how much rainwater settles between them. On the Amazon, Google, Microsoft, Meta, Samsung, Tekion lists. |
Hard | ||
053Sum
Two pointersFind every distinct triple of values that adds up to zero, using three different positions in the array. On the Amazon, Google, Microsoft, Meta, Samsung, Oracle, Morgan Stanley lists. |
Medium | ||
StringsReturn the longest contiguous part of a string that reads the same forward and backward. On the Amazon, Google, Microsoft, Meta, Tekion, IBM, Oracle, J.P. Morgan lists. |
Medium | ||
Hash tablesGroup words that contain exactly the same letters with the same counts, regardless of order. On the Amazon, Google, Meta, Oracle, J.P. Morgan, Morgan Stanley lists. |
Medium | ||
StacksCheck whether a string of round, square, and curly brackets closes every opening bracket in the correct order. On the Amazon, Google, Microsoft, Meta, IBM, Oracle lists. |
Easy | ||
Data structure designDesign a fixed-capacity cache with constant-time reads and writes. When it fills up, evict the least recently used key. On the Amazon, Microsoft, Samsung, Oracle, J.P. Morgan, Morgan Stanley lists. |
Medium | ||
Two pointersChoose two vertical lines that, together with the x-axis, can hold the greatest area of water. On the Amazon, Google, Microsoft, Meta, IBM, Oracle lists. |
Medium | ||
Linked listsTwo linked lists hold the digits of two numbers in reverse order. Return their sum in the same format. On the Amazon, Google, Microsoft, Meta lists. |
Medium | ||
IntervalsCombine overlapping intervals and return a list that covers the same ranges without overlaps. On the Amazon, Microsoft, IBM, Oracle, J.P. Morgan, Morgan Stanley lists. |
Medium | ||
Binary searchFind the median of two sorted arrays in logarithmic time relative to their combined length. On the Amazon, Google, Microsoft, Meta lists. |
Hard | ||
Dynamic programmingFind the largest sum you can make by taking a nonempty, contiguous part of an array. On the Amazon, Google, Microsoft, Meta, Tekion, Oracle lists. |
Medium | ||
MathDecide whether the decimal digits of an integer read the same from either end. On the Amazon, Google, Microsoft, Meta, Morgan Stanley lists. |
Easy | ||
Prefix sumsCount how many nonempty contiguous parts of an integer array have a sum of exactly k. On the Amazon, Google, Microsoft, Meta, IBM, J.P. Morgan lists. |
Medium | ||
Intervals · LeetCode PremiumGiven meeting start and end times, find the fewest rooms needed so every meeting can run on schedule. On the Tekion, Oracle, J.P. Morgan lists. |
Medium | ||
StringsFind the longest starting sequence of characters shared by every string in a list. On the Amazon, Google, Microsoft, Meta, IBM lists. |
Easy | ||
Two pointersCompact a sorted array in place so each distinct value appears once at the front, then return the number of distinct values. On the Google, Microsoft, Meta, Morgan Stanley lists. |
Easy | ||
Graph traversalCount the connected patches of land in a grid. Cells connect horizontally or vertically. On the Amazon, Microsoft, Samsung, Oracle lists. |
Medium | ||
Monotonic queueSlide a window of k elements across an array one position at a time and return the largest value in each window. On the Microsoft, Oracle, J.P. Morgan lists. |
Hard | ||
Hash tablesDecide whether two strings contain exactly the same characters with the same multiplicities. On the Google, Microsoft, Meta, IBM, Oracle lists. |
Easy | ||
CountingCount binary substrings made of two consecutive runs of equal length, one of zeros and one of ones in either order. On the IBM, J.P. Morgan lists. |
Easy | ||
Hash tablesFind how many values form the longest run of consecutive integers in an unsorted array, in linear time. On the Amazon, Google, Microsoft lists. |
Medium | ||
Dynamic programmingChoosing a number earns its value and eliminates all occurrences of its neighboring values. Find the highest score you can earn. On the IBM, Morgan Stanley lists. |
Medium | ||
CountingReturn the k distinct values that occur most often in the input array. On the Amazon, Oracle lists. |
Medium | ||
Breadth-first searchRot spreads to adjacent fresh oranges each minute. Find when every orange is rotten, or report that some cannot be reached. On the Amazon, Tekion lists. |
Medium | ||
Binary searchFind the slowest whole-number eating speed that finishes all the piles on time. Each hour can be spent on only one pile. On the Amazon, Google, Oracle lists. |
Medium | ||
CountingChildren stand in a line with some initially infected. Count the orders in which the others can become infected, one adjacent child at a time. On the Tekion list. |
Hard | ||
Dynamic programmingFind the length of the longest strictly increasing sequence you can keep when deleting elements without reordering the rest. On the Samsung list. |
Medium |
How are questions ranked?
Company lists follow community-reported interview frequency. Ties keep the source order. Where a list uses two sources, we keep the first list’s ranks and fill the remaining places with the highest-ranked distinct problems from the second.
Across companies, first place earns 30 points and each subsequent rank earns one fewer. We add each problem’s points and break ties alphabetically.
- Amazon · Six months · 21 October 2026
- Google · Six months · 21 October 2026
- Microsoft · Six months · 21 October 2026
- Meta · Six months · 21 October 2026
- Samsung · All time · 21 October 2026
- Tekion · Ranks 1–28 · All time · 21 October 2026
Ranks 29–30 · All time · 12 July 2026 - IBM · Ranks 1–24 · Six months · 21 October 2026
Ranks 25–30 · All time · 21 October 2026 - Oracle · All time · 21 October 2026
- J.P. Morgan · All time · 12 July 2026
- Morgan Stanley · All time · 21 October 2026