The Top Interview 150 LeetCode List

The official interview-preparation list, a hundred and fifty problems covering every data structure and technique a technical screen is likely to reach for.

Easy
40
Medium
92
Hard
18
Patterns
21

Every entry, grouped by pattern

Each group is the pattern that most specifically solves those problems, so the list can be worked through a technique at a time instead of a problem at a time. Groups appear in the order the list itself introduces them.

Two Pointers (14)

Two Pointers
No.ProblemDifficulty
0088Merge Sorted ArrayEasy
0027Remove ElementEasy
0026Remove Duplicates from Sorted ArrayEasy
0080Remove Duplicates from Sorted Array IIMedium
0189Rotate ArrayMedium
0151Reverse Words in a StringMedium
0028Find the Index of the First Occurrence in a StringEasy
0125Valid PalindromeEasy
0392Is SubsequenceEasy
0167Two Sum II - Input Array Is SortedMedium
0011Container With Most WaterMedium
00153SumMedium
0202Happy NumberEasy
0005Longest Palindromic SubstringMedium

Sorting (5)

Sorting
No.ProblemDifficulty
0169Majority ElementEasy
0274H-IndexMedium
0242Valid AnagramEasy
0049Group AnagramsMedium
0056Merge IntervalsMedium

Dynamic Programming (9)

Dynamic Programming
No.ProblemDifficulty
0121Best Time to Buy and Sell StockEasy
0053Maximum SubarrayMedium
0070Climbing StairsEasy
0198House RobberMedium
0120TriangleMedium
0097Interleaving StringMedium
0072Edit DistanceMedium
0123Best Time to Buy and Sell Stock IIIHard
0188Best Time to Buy and Sell Stock IVHard

Greedy (6)

Greedy
No.ProblemDifficulty
0122Best Time to Buy and Sell Stock IIMedium
0055Jump GameMedium
0045Jump Game IIMedium
0134Gas StationMedium
0135CandyHard
0452Minimum Number of Arrows to Burst BalloonsMedium

Math and Number Theory (8)

Math and Number Theory
No.ProblemDifficulty
0380Insert Delete GetRandom O(1)Medium
0013Roman to IntegerEasy
0012Integer to RomanMedium
0009Palindrome NumberEasy
0066Plus OneEasy
0172Factorial Trailing ZeroesMedium
0050Pow(x, n)Medium
0149Max Points on a LineHard

Prefix Sum (1)

Prefix Sum
No.ProblemDifficulty
0238Product of Array Except SelfMedium

Stack (8)

Stack
No.ProblemDifficulty
0042Trapping Rain WaterHard
0020Valid ParenthesesEasy
0071Simplify PathMedium
0155Min StackMedium
0150Evaluate Reverse Polish NotationMedium
0224Basic CalculatorHard
0173Binary Search Tree IteratorMedium
0918Maximum Sum Circular SubarrayMedium

Other (5)

Other
No.ProblemDifficulty
0058Length of Last WordEasy
0006Zigzag ConversionMedium
0068Text JustificationHard
0228Summary RangesEasy
0057Insert IntervalMedium

Trie (5)

Trie
No.ProblemDifficulty
0014Longest Common PrefixEasy
0208Implement Trie (Prefix Tree)Medium
0211Design Add and Search Words Data StructureMedium
0212Word Search IIHard
0139Word BreakMedium

Sliding Window (5)

Sliding Window
No.ProblemDifficulty
0209Minimum Size Subarray SumMedium
0003Longest Substring Without Repeating CharactersMedium
0030Substring with Concatenation of All WordsHard
0076Minimum Window SubstringHard
0219Contains Duplicate IIEasy

Matrix and Grid (11)

Matrix and Grid
No.ProblemDifficulty
0036Valid SudokuMedium
0054Spiral MatrixMedium
0048Rotate ImageMedium
0073Set Matrix ZeroesMedium
0289Game of LifeMedium
0909Snakes and LaddersMedium
0427Construct Quad TreeMedium
0074Search a 2D MatrixMedium
0064Minimum Path SumMedium
0063Unique Paths IIMedium
0221Maximal SquareMedium

Hash Map (4)

Hash Map
No.ProblemDifficulty
0383Ransom NoteEasy
0205Isomorphic StringsEasy
0290Word PatternEasy
0001Two SumEasy

Union-Find (4)

Union-Find
No.ProblemDifficulty
0128Longest Consecutive SequenceMedium
0200Number of IslandsMedium
0130Surrounded RegionsMedium
0399Evaluate DivisionMedium

Linked List (15)

Linked List
No.ProblemDifficulty
0141Linked List CycleEasy
0002Add Two NumbersMedium
0021Merge Two Sorted ListsEasy
0138Copy List with Random PointerMedium
0092Reverse Linked List IIMedium
0025Reverse Nodes in k-GroupHard
0019Remove Nth Node From End of ListMedium
0082Remove Duplicates from Sorted List IIMedium
0061Rotate ListMedium
0086Partition ListMedium
0146LRU CacheMedium
0117Populating Next Right Pointers in Each Node IIMedium
0114Flatten Binary Tree to Linked ListMedium
0148Sort ListMedium
0023Merge k Sorted ListsHard

Tree Traversal (18)

Tree Traversal
No.ProblemDifficulty
0104Maximum Depth of Binary TreeEasy
0100Same TreeEasy
0226Invert Binary TreeEasy
0101Symmetric TreeEasy
0105Construct Binary Tree from Preorder and Inorder TraversalMedium
0106Construct Binary Tree from Inorder and Postorder TraversalMedium
0112Path SumEasy
0129Sum Root to Leaf NumbersMedium
0124Binary Tree Maximum Path SumHard
0236Lowest Common Ancestor of a Binary TreeMedium
0199Binary Tree Right Side ViewMedium
0637Average of Levels in Binary TreeEasy
0102Binary Tree Level Order TraversalMedium
0103Binary Tree Zigzag Level Order TraversalMedium
0530Minimum Absolute Difference in BSTEasy
0230Kth Smallest Element in a BSTMedium
0098Validate Binary Search TreeMedium
0108Convert Sorted Array to Binary Search TreeEasy

Bit Manipulation (7)

Bit Manipulation
No.ProblemDifficulty
0222Count Complete Tree NodesEasy
0067Add BinaryEasy
0190Reverse BitsEasy
0191Number of 1 BitsEasy
0136Single NumberEasy
0137Single Number IIMedium
0201Bitwise AND of Numbers RangeMedium

Breadth-First Search (4)

Breadth-First Search
No.ProblemDifficulty
0133Clone GraphMedium
0433Minimum Genetic MutationMedium
0127Word LadderHard
0322Coin ChangeMedium

Topological Sort (2)

Topological Sort
No.ProblemDifficulty
0207Course ScheduleMedium
0210Course Schedule IIMedium

Backtracking (7)

Backtracking
No.ProblemDifficulty
0017Letter Combinations of a Phone NumberMedium
0077CombinationsMedium
0046PermutationsMedium
0039Combination SumMedium
0052N-Queens IIHard
0022Generate ParenthesesMedium
0079Word SearchMedium

Binary Search (8)

Binary Search
No.ProblemDifficulty
0035Search Insert PositionEasy
0162Find Peak ElementMedium
0033Search in Rotated Sorted ArrayMedium
0034Find First and Last Position of Element in Sorted ArrayMedium
0153Find Minimum in Rotated Sorted ArrayMedium
0004Median of Two Sorted ArraysHard
0069Sqrt(x)Easy
0300Longest Increasing SubsequenceMedium

Heap / Priority Queue (4)

Heap / Priority Queue
No.ProblemDifficulty
0215Kth Largest Element in an ArrayMedium
0502IPOHard
0373Find K Pairs with Smallest SumsMedium
0295Find Median from Data StreamHard

The Top Interview 150 is a published third-party selection, reproduced here by problem number in the order the list itself uses. 150 of its 150 entries carry a complete Python solution.

Eyes only

The Top Interview 150 does not cover the problem you get asked.

In the live round, Stealth Interview reads the problem off your screen, returns a working solution with a step-by-step explanation and its time and space complexity, and transcribes what the interviewer says. It's a desktop app for macOS and Windows, invisible to screen sharing.