DSA practice list
NeetCode 150, by pattern
The NeetCode 150 list, practised on thita. Every problem is grouped under the 99 DSA patterns it teaches, with NeetCode's topic kept as a tag, so you can see which technique each problem is drilling instead of only which data structure it uses.
Each problem opens in an editor in the browser, where you run your code against the problem's test cases. Every problem on this list that is live on thita runs in all 6 of Python, C++, Java, JavaScript, Go and C#. When a pattern feels solid, take it into an AI mock interview: you solve a problem out loud, the interviewer runs your code and asks the follow-up questions a real one would.
All 150 problems are on thita.
Last updated
The 150 problems on thita, grouped by pattern
Families and patterns follow the DSA patterns sheet. The tag on each problem is its NeetCode topic.
Array/Matrix Manipulation Patterns
Spiral Traversal
- Spiral MatrixMediumMath & Geometry
Set Matrix Zeroes (In-place Marking)
- Set Matrix ZeroesMediumMath & Geometry
Hashing - Frequency Map / Counting
- Valid AnagramEasyArrays & Hashing
- Two SumEasyArrays & Hashing
- Group AnagramsMediumArrays & HashingEditorial
Product Except Self (Prefix/Suffix Products)
- Product of Array Except SelfMediumArrays & Hashing
Plus One (Handling Carry)
- Plus OneEasyMath & Geometry
- Multiply StringsMediumMath & Geometry
Hashing - Previously Seen / Existence Check
- Contains DuplicateEasyArrays & HashingEditorial
- Valid SudokuMediumArrays & HashingEditorial
- Longest Consecutive SequenceMediumArrays & HashingEditorial
In-place Rotation
- Rotate ImageMediumMath & Geometry
Linked List Manipulation Patterns
Reordering / Partitioning
- Reorder ListMediumLinked List
In-place Reversal
- Reverse Linked ListEasyLinked ListEditorial
- Reverse Nodes In K GroupHardLinked List
Merging Two Sorted Lists
- Merge Two Sorted ListsEasyLinked List
Addition of Numbers
- Add Two NumbersMediumLinked ListEditorial
Two Pointers
Fast & Slow (Cycle Detection)
- Linked List CycleEasyLinked ListEditorial
- Find The Duplicate NumberMediumLinked ListEditorial
- Happy NumberEasyMath & GeometryEditorial
Converging (Sorted Array Target Sum)
- Two Sum II Input Array Is SortedMediumTwo PointersEditorial
- 3SumMediumTwo PointersEditorial
- Container With Most WaterMediumTwo PointersEditorial
Expanding From Center (Palindromes)
- Longest Palindromic SubstringMedium1-D Dynamic ProgrammingEditorial
- Palindromic SubstringsMedium1-D Dynamic ProgrammingEditorial
String Reversal
- Reverse IntegerMediumBit ManipulationEditorial
In-place Array Modification
- Trapping Rain WaterHardTwo PointersEditorial
Sliding Window
Monotonic Queue for Max/Min
- Sliding Window MaximumHardSliding Window
Variable Size (Condition-Based)
- Longest Substring Without Repeating CharactersMediumSliding Window
- Longest Repeating Character ReplacementMediumSliding Window
- Minimum Window SubstringHardSliding Window
Character Frequency Matching
- Permutation In StringMediumSliding Window
Binary Search Patterns
On Sorted Array/List
- Binary SearchEasyBinary SearchEditorial
- Search a 2D MatrixMediumBinary Search
Find Min/Max in Rotated Sorted Array
- Find Minimum In Rotated Sorted ArrayMediumBinary SearchEditorial
- Search In Rotated Sorted ArrayMediumBinary Search
Median and Kth of Two Sorted Arrays
- Median of Two Sorted ArraysHardBinary Search
On Answer / Condition Function
- Koko Eating BananasMediumBinary SearchEditorial
Stack Patterns
Valid Parentheses Matching
- Valid ParenthesesEasyStack
- Valid Parenthesis StringMediumGreedyEditorial
Monotonic Stack
- Daily TemperaturesMediumStackEditorial
- Car FleetMediumStackEditorial
Stack - Min Stack Design
- Min StackMediumStack
Simulation / Backtracking Helper
- Reconstruct ItineraryHardAdvanced GraphsEditorial
String Manipulation Patterns
Palindrome Check (Two Pointers / Reverse)
- Valid PalindromeEasyTwo Pointers
Heap (Priority Queue) Patterns
K-way Merge
- Merge K Sorted ListsHardLinked List
- Design TwitterMediumHeap / Priority QueueEditorial
Top K Elements (Selection/Frequency)
- Top K Frequent ElementsMediumArrays & Hashing
- Kth Largest Element In a StreamEasyHeap / Priority QueueEditorial
- Last Stone WeightEasyHeap / Priority QueueEditorial
- K Closest Points to OriginMediumHeap / Priority QueueEditorial
- Kth Largest Element In An ArrayMediumHeap / Priority QueueEditorial
Scheduling / Minimum Cost (Greedy with Priority Queue)
- Meeting Rooms IIMediumIntervals
- Minimum Interval to Include Each QueryHardIntervalsEditorial
Two Heaps for Median Finding
- Find Median From Data StreamHardHeap / Priority QueueEditorial
Tree Traversal Patterns (DFS & BFS)
Recursive Preorder Traversal
- Invert Binary TreeEasyTreesEditorial
- Same TreeEasyTrees
- Count Good Nodes In Binary TreeMediumTreesEditorial
- Construct Binary Tree From Preorder And Inorder TraversalMediumTreesEditorial
Recursive Inorder Traversal
- Validate Binary Search TreeMediumTrees
- Kth Smallest Element In a BstMediumTreesEditorial
Level Order Traversal
- Binary Tree Level Order TraversalMediumTreesEditorial
- Binary Tree Right Side ViewMediumTreesEditorial
Recursive Postorder Traversal
- Maximum Depth of Binary TreeEasyTrees
- Diameter of Binary TreeEasyTreesEditorial
- Balanced Binary TreeEasyTreesEditorial
- Binary Tree Maximum Path SumHardTreesEditorial
Graph Traversal Patterns (DFS & BFS)
Graph DFS - Connected Components / Island Counting
- Number of IslandsMediumGraphs
- Max Area of IslandMediumGraphs
- Pacific Atlantic Water FlowMediumGraphs
- Surrounded RegionsMediumGraphs
Graph BFS - Connected Components / Island Counting
- Walls And GatesMediumGraphsEditorial
- Rotting OrangesMediumGraphs
- Word LadderHardGraphs
Graph BFS - Topological Sort (Kahn's Algorithm)
- Alien DictionaryHardAdvanced GraphsEditorial
Graph DFS - Cycle Detection (Directed Graph)
- Course ScheduleMediumGraphsEditorial
- Course Schedule IIMediumGraphsEditorial
Shortest Path (Bellman-Ford / BFS+K)
- Cheapest Flights Within K StopsMediumAdvanced GraphsEditorial
Shortest Path (Dijkstra's Algorithm)
- Network Delay TimeMediumAdvanced Graphs
- Swim In Rising WaterHardAdvanced Graphs
Deep Copy / Cloning
- Copy List With Random PointerMediumLinked ListEditorial
- Clone GraphMediumGraphsEditorial
Union-Find (Disjoint Set Union - DSU)
- Graph Valid TreeMediumGraphsEditorial
- Number of Connected Components In An Undirected GraphMediumGraphs
- Redundant ConnectionMediumGraphs
Minimum Spanning Tree (Kruskal / Prim / DSU + heap)
- Min Cost to Connect All PointsMediumAdvanced Graphs
Greedy Patterns
Jump Game Reachability/Minimization
- Jump GameMediumGreedyEditorial
- Jump Game IIMediumGreedyEditorial
Sorting Based
- Hand of StraightsMediumGreedyEditorial
- Merge Triplets to Form Target TripletMediumGreedyEditorial
Task Scheduling (Frequency Based)
- Task SchedulerMediumHeap / Priority Queue
Interval Merging/Scheduling
- Insert IntervalMediumIntervalsEditorial
- Merge IntervalsMediumIntervals
- Non Overlapping IntervalsMediumIntervalsEditorial
- Meeting RoomsEasyIntervalsEditorial
Line Sweep
- Partition LabelsMediumGreedyEditorial
Gas Station Circuit
- Gas StationMediumGreedyEditorial
Backtracking Patterns
Word Search / Path Finding in Grid
- Word SearchMediumBacktracking
- Word Search IIHardTries
N-Queens / Constraint Satisfaction
- N QueensHardBacktracking
Permutations
- PermutationsMediumBacktracking
Palindrome Partitioning
- Palindrome PartitioningMediumBacktracking
Combination Sum
- Combination SumMediumBacktrackingEditorial
- Combination Sum IIMediumBacktrackingEditorial
Subsets (Include/Exclude)
- SubsetsMediumBacktracking
- Subsets IIMediumBacktracking
- Letter Combinations of a Phone NumberMediumBacktrackingEditorial
Dynamic Programming (DP) Patterns
2D Array (Edit Distance / Levenshtein Distance)
- Edit DistanceMedium2-D Dynamic ProgrammingEditorial
- Regular Expression MatchingHard2-D Dynamic ProgrammingEditorial
1D Array (Kadane's Algorithm for Max/Min Subarray)
- Maximum Product SubarrayMedium1-D Dynamic Programming
- Maximum SubarrayMediumGreedy
Interval DP
- Burst BalloonsHard2-D Dynamic ProgrammingEditorial
2D Array (Unique Paths on Grid)
- Unique PathsMedium2-D Dynamic Programming
- Interleaving StringMedium2-D Dynamic ProgrammingEditorial
- Longest Increasing Path In a MatrixHard2-D Dynamic ProgrammingEditorial
1D Array (Fibonacci Style)
- Climbing StairsEasy1-D Dynamic ProgrammingEditorial
- Min Cost Climbing StairsEasy1-D Dynamic Programming
- House RobberMedium1-D Dynamic ProgrammingEditorial
- House Robber IIMedium1-D Dynamic ProgrammingEditorial
- Decode WaysMedium1-D Dynamic ProgrammingEditorial
1D Array (0/1 Knapsack Subset Sum Style)
- Partition Equal Subset SumMedium1-D Dynamic Programming
- Target SumMedium2-D Dynamic Programming
2D Array (Longest Common Subsequence - LCS)
- Longest Common SubsequenceMedium2-D Dynamic Programming
- Distinct SubsequencesHard2-D Dynamic ProgrammingEditorial
1D Array (Word Break Style)
- Word BreakMedium1-D Dynamic Programming
Stock problems
- Best Time to Buy And Sell StockEasySliding WindowEditorial
- Best Time to Buy And Sell Stock With CooldownMedium2-D Dynamic ProgrammingEditorial
1D Array (Coin Change / Unbounded Knapsack Style)
- Coin ChangeMedium1-D Dynamic ProgrammingEditorial
- Coin Change IIMedium2-D Dynamic ProgrammingEditorial
Longest Increasing Subsequence (LIS)
- Longest Increasing SubsequenceMedium1-D Dynamic Programming
Bit Manipulation Patterns
Bitwise XOR - Finding Single/Missing Number
- Single NumberEasyBit Manipulation
- Missing NumberEasyBit Manipulation
- Sum of Two IntegersMediumBit ManipulationEditorial
Bitwise DP - Counting Bits Optimization
- Counting BitsEasyBit ManipulationEditorial
Bitwise AND - Counting Set Bits (Hamming Weight)
- Number of 1 BitsEasyBit Manipulation
- Reverse BitsEasyBit ManipulationEditorial
Design Patterns
Tries
- Implement Trie Prefix TreeMediumTriesEditorial
- Design Add And Search Words Data StructureMediumTriesEditorial
Design (General/Specific)
- Encode and Decode StringsMediumArrays & HashingEditorial
- Time Based Key Value StoreMediumBinary Search
- LRU CacheMediumLinked List
- Detect SquaresMediumMath & GeometryEditorial
A study plan for the NeetCode 150
Six blocks in NeetCode's topic order. Solve each problem, then write down the pattern in one line. On the last day of each week, re-solve two problems from memory before starting the next block.
Weeks 1-2: Arrays, two pointers, sliding window and stacks (27 problems)
Hash maps for lookups, the two pointer moves, when a window grows and shrinks, and the monotonic stack.
Week 3: Binary search and linked lists (18 problems)
Searching on the answer, not just the array, and pointer surgery on lists without losing a node.
Week 4: Trees, tries and heaps (25 problems)
Recursive DFS that returns something useful, level-order BFS, prefix trees, and top-k with a heap.
Weeks 5-6: Backtracking and graphs (28 problems)
Choose, explore, un-choose; grid BFS and DFS; union-find; topological sort; Dijkstra and minimum spanning trees.
Week 7: Dynamic programming (23 problems)
State, transition and base case, written out loud before any code; then the 2-D grid and string tables.
Week 8: Greedy, intervals, math and bits (29 problems)
Proving a greedy choice, sorting intervals by start, matrix walks, and XOR tricks.
Questions, answered
- What is the NeetCode 150?
- The NeetCode 150 is a list of 150 LeetCode problems put together by NeetCode (neetcode.io) to cover the topics coding interviews draw on, from arrays and hashing to graphs and dynamic programming. This page is the NeetCode 150 list, practised on thita. Thita is not affiliated with NeetCode; the list name is used only to say which problems are here.
- What is the difference between the NeetCode 150 and the NeetCode 250?
- The NeetCode 250 contains all 150 problems of the NeetCode 150 plus 100 more: 54 Medium, 32 Easy and 14 Hard. They add more practice per topic, including easier warm-ups that help if a topic is new to you. If you have under two months, the 150 is the better fit; if you have three months or want more repetition per pattern, take the 250. All 75 problems of the Blind 75 are in the NeetCode 150.
- Why are the problems grouped by pattern instead of by NeetCode's topics?
- A topic says which data structure a problem uses; a pattern says which move solves it. "Trees" covers both a level-order BFS and a postorder DFS that returns heights, and interviewers test whether you can tell those apart. Grouping by thita's 99 patterns puts problems that are solved the same way next to each other. NeetCode's topic is still shown on every problem.
- Which languages can I practise the NeetCode 150 in?
- Every problem on the NeetCode 150 that is live on thita runs in all 6 of Python, C++, Java, JavaScript, Go and C#. Your code runs against the problem's test cases in the browser, with no setup or local compiler.
- Are all 150 problems available on thita?
- All 150 problems are on thita.
- Is it free?
- Browsing the list and running your code against the test cases is free on the Starter plan, which also includes 5 AI code reviews a month and the free AI mock interview allowance. Editorials marked on this page are free to read. Pro adds more AI code reviews and mock interviews and the remaining editorials.
- How long does the NeetCode 150 take?
- The plan on this page spreads it over eight weeks at about three problems a day, with a review day each week. Going faster works if you already know most patterns; the risk is solving each problem once and not being able to rebuild the approach a month later.
- Is the NeetCode 150 enough to pass coding interviews?
- It covers the core patterns most coding rounds draw on, but solving a list is not the same as solving a new problem under time pressure while explaining yourself. Use the list to learn the patterns, then practise unseen problems from the same patterns and rehearse out loud. The NeetCode 250 is the natural next step.
Keep going
- Blind 75 sheet
- NeetCode 250 sheet
- Practise these problems in an AI coding interview
- NeetCode 150 vs NeetCode 250 vs Blind 75: which to do
- A NeetCode 150 study plan for 4, 8 or 12 weeks
- Is the NeetCode 150 enough for FAANG?
- The NeetCode 250, the complete list by topic
- The NeetCode 150 in Java
- The NeetCode 150 in C++
- The NeetCode 150 in Go
- The NeetCode 150 in C#
- Blind 75 vs NeetCode vs pattern-based preparation
NeetCode is a trademark of its owner; thita is not affiliated with or endorsed by NeetCode.