The NeetCode 150 LeetCode List

The NeetCode 150: an expansion of the Blind 75 into eighteen topic groups, from arrays and hashing through advanced graphs and two-dimensional dynamic programming.

  • 150 problems
  • 28 Easy
  • 101 Medium
  • 21 Hard
  • 23 patterns

Where this list comes from

The NeetCode 150 is not ours. It is a published selection that people work through by name, and we reproduce it here by problem number, in the order the list itself uses. What we add is the solution: of the 150 entries below, 143 carry a complete Python solution with a worked example and its time and space complexity. The remaining 7 are either LeetCode Premium problems, whose statements are paywalled at the source, or problems our dataset holds no usable solution for. They are listed rather than quietly dropped, and the premium ones are marked in the tables.

The published list names 150 entries. All 150 resolve to a problem in this library and are listed below.

Every count on this page is computed from what the page renders, so the number in a heading is the number of rows under it. Nothing is padded to make a title's number come out right — that would be wrong in a way anyone who knows the list would spot in seconds.

All 150 problems, 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.

Sorting (5)

#ProblemDifficultyTopics
217Contains DuplicateEasyArray, Hash Table, Sorting
242Valid AnagramEasyHash Table, String, Sorting
49Group AnagramsMediumArray, Hash Table, String +1
56Merge IntervalsMediumArray, Sorting
252Meeting RoomsPremiumEasyArray, Sorting

Hash Map (3)

#ProblemDifficultyTopics
1Two SumEasyArray, Hash Table
271Encode and Decode StringsPremiumMediumDesign, Array, String
2013Detect SquaresMediumDesign, Array, Hash Table +1

Heap / Priority Queue (10)

#ProblemDifficultyTopics
347Top K Frequent ElementsMediumArray, Hash Table, Divide and Conquer +5
703Kth Largest Element in a StreamEasyTree, Design, Binary Search Tree +3
1046Last Stone WeightEasyArray, Heap (Priority Queue)
973K Closest Points to OriginMediumGeometry, Array, Math +4
215Kth Largest Element in an ArrayMediumArray, Divide and Conquer, Quickselect +2
621Task SchedulerMediumGreedy, Array, Hash Table +3
295Find Median from Data StreamHardDesign, Two Pointers, Data Stream +2
743Network Delay TimeMediumDepth-First Search, Breadth-First Search, Graph +2
787Cheapest Flights Within K StopsMediumDepth-First Search, Breadth-First Search, Graph +3
1851Minimum Interval to Include Each QueryHardArray, Binary Search, Sorting +2

Prefix Sum (2)

#ProblemDifficultyTopics
238Product of Array Except SelfMediumArray, Prefix Sum
253Meeting Rooms IIPremiumMediumGreedy, Array, Two Pointers +3

Matrix and Grid (8)

#ProblemDifficultyTopics
36Valid SudokuMediumArray, Hash Table, Matrix
74Search a 2D MatrixMediumArray, Binary Search, Matrix
417Pacific Atlantic Water FlowMediumDepth-First Search, Breadth-First Search, Array +1
994Rotting OrangesMediumBreadth-First Search, Array, Matrix
286Walls and GatesPremiumMediumBreadth-First Search, Array, Matrix
48Rotate ImageMediumArray, Math, Matrix
54Spiral MatrixMediumArray, Matrix, Simulation
73Set Matrix ZeroesMediumArray, Hash Table, Matrix

Union-Find (9)

#ProblemDifficultyTopics
128Longest Consecutive SequenceMediumUnion Find, Array, Hash Table
200Number of IslandsMediumDepth-First Search, Breadth-First Search, Union Find +2
695Max Area of IslandMediumDepth-First Search, Breadth-First Search, Union Find +2
130Surrounded RegionsMediumDepth-First Search, Breadth-First Search, Union Find +2
684Redundant ConnectionMediumDepth-First Search, Breadth-First Search, Union Find +1
323Number of Connected Components in an Undirected GraphPremiumMediumDepth-First Search, Breadth-First Search, Union Find +1
261Graph Valid TreePremiumMediumDepth-First Search, Breadth-First Search, Union Find +1
1584Min Cost to Connect All PointsMediumUnion Find, Graph, Array +1
778Swim in Rising WaterHardDepth-First Search, Breadth-First Search, Union Find +4

Two Pointers (8)

#ProblemDifficultyTopics
125Valid PalindromeEasyTwo Pointers, String
167Two Sum II - Input Array Is SortedMediumArray, Two Pointers, Binary Search
153SumMediumArray, Two Pointers, Sorting
11Container With Most WaterMediumGreedy, Array, Two Pointers
5Longest Palindromic SubstringMediumTwo Pointers, String, Dynamic Programming
647Palindromic SubstringsMediumTwo Pointers, String, Dynamic Programming
763Partition LabelsMediumGreedy, Hash Table, Two Pointers +1
202Happy NumberEasyHash Table, Math, Two Pointers

Stack (8)

#ProblemDifficultyTopics
42Trapping Rain WaterHardStack, Array, Two Pointers +2
20Valid ParenthesesEasyStack, String
155Min StackMediumStack, Design
150Evaluate Reverse Polish NotationMediumStack, Array, Math
739Daily TemperaturesMediumStack, Array, Monotonic Stack
853Car FleetMediumStack, Array, Sorting +1
84Largest Rectangle in HistogramHardStack, Array, Monotonic Stack
678Valid Parenthesis StringMediumStack, Greedy, String +1

Dynamic Programming (18)

#ProblemDifficultyTopics
121Best Time to Buy and Sell StockEasyArray, Dynamic Programming
70Climbing StairsEasyMemoization, Math, Dynamic Programming
746Min Cost Climbing StairsEasyArray, Dynamic Programming
198House RobberMediumArray, Dynamic Programming
213House Robber IIMediumArray, Dynamic Programming
91Decode WaysMediumString, Dynamic Programming
152Maximum Product SubarrayMediumArray, Dynamic Programming
416Partition Equal Subset SumMediumArray, Dynamic Programming
62Unique PathsMediumMath, Dynamic Programming, Combinatorics
1143Longest Common SubsequenceMediumString, Dynamic Programming
309Best Time to Buy and Sell Stock with CooldownMediumArray, Dynamic Programming
518Coin Change IIMediumArray, Dynamic Programming
97Interleaving StringMediumString, Dynamic Programming
115Distinct SubsequencesHardString, Dynamic Programming
72Edit DistanceMediumString, Dynamic Programming
312Burst BalloonsHardArray, Dynamic Programming
10Regular Expression MatchingHardRecursion, String, Dynamic Programming
53Maximum SubarrayMediumArray, Divide and Conquer, Dynamic Programming

Sliding Window (5)

#ProblemDifficultyTopics
3Longest Substring Without Repeating CharactersMediumHash Table, String, Sliding Window
424Longest Repeating Character ReplacementMediumHash Table, String, Sliding Window
567Permutation in StringMediumHash Table, Two Pointers, String +1
76Minimum Window SubstringHardHash Table, String, Sliding Window
239Sliding Window MaximumHardQueue, Array, Sliding Window +2

Backtracking (11)

#ProblemDifficultyTopics
22Generate ParenthesesMediumString, Dynamic Programming, Backtracking
78SubsetsMediumBit Manipulation, Array, Backtracking
39Combination SumMediumArray, Backtracking
46PermutationsMediumArray, Backtracking
90Subsets IIMediumBit Manipulation, Array, Backtracking
40Combination Sum IIMediumArray, Backtracking
79Word SearchMediumDepth-First Search, Array, String +2
131Palindrome PartitioningMediumString, Dynamic Programming, Backtracking
17Letter Combinations of a Phone NumberMediumHash Table, String, Backtracking
51N-QueensHardArray, Backtracking
494Target SumMediumArray, Dynamic Programming, Backtracking

Monotonic Stack (6)

#ProblemDifficultyTopics
704Binary SearchEasyArray, Binary Search
875Koko Eating BananasMediumArray, Binary Search
153Find Minimum in Rotated Sorted ArrayMediumArray, Binary Search
33Search in Rotated Sorted ArrayMediumArray, Binary Search
4Median of Two Sorted ArraysHardArray, Binary Search, Divide and Conquer
300Longest Increasing SubsequenceMediumArray, Binary Search, Dynamic Programming

Binary Search (1)

#ProblemDifficultyTopics
981Time Based Key-Value StoreMediumDesign, Hash Table, String +1

Linked List (11)

#ProblemDifficultyTopics
206Reverse Linked ListEasyRecursion, Linked List
21Merge Two Sorted ListsEasyRecursion, Linked List
143Reorder ListMediumStack, Recursion, Linked List +1
19Remove Nth Node From End of ListMediumLinked List, Two Pointers
138Copy List with Random PointerMediumHash Table, Linked List
2Add Two NumbersMediumRecursion, Linked List, Math
141Linked List CycleEasyHash Table, Linked List, Two Pointers
146LRU CacheMediumDesign, Hash Table, Linked List +1
23Merge k Sorted ListsHardLinked List, Divide and Conquer, Heap (Priority Queue) +1
25Reverse Nodes in k-GroupHardRecursion, Linked List
355Design TwitterMediumDesign, Hash Table, Linked List +1

Bit Manipulation (7)

#ProblemDifficultyTopics
287Find the Duplicate NumberMediumBit Manipulation, Array, Two Pointers +1
136Single NumberEasyBit Manipulation, Array
191Number of 1 BitsEasyBit Manipulation, Divide and Conquer
338Counting BitsEasyBit Manipulation, Dynamic Programming
190Reverse BitsEasyBit Manipulation, Divide and Conquer
268Missing NumberEasyBit Manipulation, Array, Hash Table +3
371Sum of Two IntegersMediumBit Manipulation, Math

Tree Traversal (15)

#ProblemDifficultyTopics
226Invert Binary TreeEasyTree, Depth-First Search, Breadth-First Search +1
104Maximum Depth of Binary TreeEasyTree, Depth-First Search, Breadth-First Search +1
543Diameter of Binary TreeEasyTree, Depth-First Search, Binary Tree
110Balanced Binary TreeEasyTree, Depth-First Search, Binary Tree
100Same TreeEasyTree, Depth-First Search, Breadth-First Search +1
572Subtree of Another TreeEasyTree, Depth-First Search, Binary Tree +2
235Lowest Common Ancestor of a Binary Search TreeMediumTree, Depth-First Search, Binary Search Tree +1
102Binary Tree Level Order TraversalMediumTree, Breadth-First Search, Binary Tree
199Binary Tree Right Side ViewMediumTree, Depth-First Search, Breadth-First Search +1
1448Count Good Nodes in Binary TreeMediumTree, Depth-First Search, Breadth-First Search +1
98Validate Binary Search TreeMediumTree, Depth-First Search, Binary Search Tree +1
230Kth Smallest Element in a BSTMediumTree, Depth-First Search, Binary Search Tree +1
105Construct Binary Tree from Preorder and Inorder TraversalMediumTree, Array, Hash Table +2
124Binary Tree Maximum Path SumHardTree, Depth-First Search, Dynamic Programming +1
297Serialize and Deserialize Binary TreeHardTree, Depth-First Search, Breadth-First Search +3

Trie (4)

#ProblemDifficultyTopics
208Implement Trie (Prefix Tree)MediumDesign, Trie, Hash Table +1
211Design Add and Search Words Data StructureMediumDepth-First Search, Design, Trie +1
212Word Search IIHardTrie, Array, String +2
139Word BreakMediumTrie, Memoization, Array +3

Breadth-First Search (3)

#ProblemDifficultyTopics
133Clone GraphMediumDepth-First Search, Breadth-First Search, Graph +1
127Word LadderHardBreadth-First Search, Hash Table, String
322Coin ChangeMediumBreadth-First Search, Array, Dynamic Programming

Topological Sort (4)

#ProblemDifficultyTopics
207Course ScheduleMediumDepth-First Search, Breadth-First Search, Graph +1
210Course Schedule IIMediumDepth-First Search, Breadth-First Search, Graph +1
269Alien DictionaryPremiumHardDepth-First Search, Breadth-First Search, Graph +3
329Longest Increasing Path in a MatrixHardDepth-First Search, Breadth-First Search, Graph +5

Depth-First Search (1)

#ProblemDifficultyTopics
332Reconstruct ItineraryHardDepth-First Search, Graph, Eulerian Circuit

Greedy (6)

#ProblemDifficultyTopics
55Jump GameMediumGreedy, Array, Dynamic Programming
45Jump Game IIMediumGreedy, Array, Dynamic Programming
846Hand of StraightsMediumGreedy, Array, Hash Table +1
1899Merge Triplets to Form Target TripletMediumGreedy, Array
134Gas StationMediumGreedy, Array
435Non-overlapping IntervalsMediumGreedy, Array, Dynamic Programming +1

Other (1)

#ProblemDifficultyTopics
57Insert IntervalMediumArray

Math and Number Theory (4)

#ProblemDifficultyTopics
66Plus OneEasyArray, Math
50Pow(x, n)MediumRecursion, Math
43Multiply StringsMediumMath, String, Simulation
7Reverse IntegerMediumMath

Or go by technique instead of by list: all LeetCode patterns · the full problem list.

The NeetCode 150 does not cover the problem you get asked

Stealth Interview is a desktop app for macOS and Windows. It reads the coding 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 is saying — while staying invisible to screen sharing.