DSA practice list
NeetCode 250 List (Sheet), by pattern
The NeetCode 250 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 250 problems are on thita.
Last updated
The 250 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
Merge Sorted Array (In-place from End)
- Merge Sorted ArrayEasyTwo PointersSolve
Spiral Traversal
- Spiral MatrixMediumMath & GeometrySolve
Set Matrix Zeroes (In-place Marking)
- Set Matrix ZeroesMediumMath & GeometrySolve
Hashing - Frequency Map / Counting
- Valid AnagramEasyArrays & HashingSolve
- Two SumEasyArrays & HashingSolve
- Group AnagramsMediumArrays & HashingSolve
- Majority ElementEasyArrays & HashingSolve
- Majority Element IIMediumArrays & HashingSolve
- Subarray Sum Equals KMediumArrays & HashingSolve
- Verifying An Alien DictionaryEasyGraphsSolve
- Find the Town JudgeEasyGraphsSolve
Prefix Sum - Subarray Sum / Range Query
- Range Sum Query 2D ImmutableMediumArrays & HashingSolve
Product Except Self (Prefix/Suffix Products)
- Product of Array Except SelfMediumArrays & HashingSolve
Plus One (Handling Carry)
- Plus OneEasyMath & GeometrySolve
- Multiply StringsMediumMath & GeometrySolve
- Add BinaryEasyBit ManipulationSolve
Array - Cyclic Sort
- First Missing PositiveHardArrays & HashingSolve
Hashing - Previously Seen / Existence Check
- Contains DuplicateEasyArrays & HashingSolve
- Design HashSetEasyArrays & HashingSolve
- Valid SudokuMediumArrays & HashingSolve
- Longest Consecutive SequenceMediumArrays & HashingSolve
In-place Rotation
- Concatenation of ArrayEasyArrays & HashingSolve
- Rotate ArrayMediumTwo PointersSolve
- Transpose MatrixEasyMath & GeometrySolve
- Rotate ImageMediumMath & GeometrySolve
Linked List Manipulation Patterns
Reordering / Partitioning
- Reorder ListMediumLinked ListSolve
- Insert Greatest Common Divisors in Linked ListMediumMath & GeometrySolve
In-place Reversal
- Reverse Linked ListEasyLinked ListSolve
- Reverse Linked List IIMediumLinked ListSolve
- Reverse Nodes In K GroupHardLinked ListSolve
Merging Two Sorted Lists
- Merge Two Sorted ListsEasyLinked ListSolve
Addition of Numbers
- Add Two NumbersMediumLinked ListSolve
Two Pointers
Fast & Slow (Cycle Detection)
- Linked List CycleEasyLinked ListSolve
- Find The Duplicate NumberMediumLinked ListSolve
- Happy NumberEasyMath & GeometrySolve
Converging (Sorted Array Target Sum)
- Two Sum II Input Array Is SortedMediumTwo PointersSolve
- 3SumMediumTwo PointersSolve
- 4SumMediumTwo PointersSolve
- Container With Most WaterMediumTwo PointersSolve
- Boats to Save PeopleMediumTwo PointersSolve
Expanding From Center (Palindromes)
- Longest Palindromic SubstringMedium1-D Dynamic ProgrammingSolve
- Palindromic SubstringsMedium1-D Dynamic ProgrammingSolve
String Reversal
- Reverse StringEasyTwo PointersSolve
- Reverse IntegerMediumBit ManipulationSolve
In-place Array Modification
- Remove ElementEasyArrays & HashingSolve
- Sort ColorsMediumArrays & HashingSolve
- Merge Strings AlternatelyEasyTwo PointersSolve
- Remove Duplicates From Sorted ArrayEasyTwo PointersSolve
- Trapping Rain WaterHardTwo PointersSolve
Sliding Window
Monotonic Queue for Max/Min
- Sliding Window MaximumHardSliding WindowSolve
Variable Size (Condition-Based)
- Contains Duplicate IIEasySliding WindowSolve
- Longest Substring Without Repeating CharactersMediumSliding WindowSolve
- Longest Repeating Character ReplacementMediumSliding WindowSolve
- Minimum Size Subarray SumMediumSliding WindowSolve
- Minimum Window SubstringHardSliding WindowSolve
- Longest Turbulent SubarrayMediumGreedySolve
- Jump Game VIIMediumGreedySolve
Character Frequency Matching
- Permutation In StringMediumSliding WindowSolve
Binary Search Patterns
On Sorted Array/List
- Binary SearchEasyBinary SearchSolve
- Search Insert PositionEasyBinary SearchSolve
- Guess Number Higher Or LowerEasyBinary SearchSolve
- Sqrt(x)EasyBinary SearchSolve
- Search a 2D MatrixMediumBinary SearchSolve
Find First/Last Occurrence
- Find K Closest ElementsMediumSliding WindowSolve
Find Min/Max in Rotated Sorted Array
- Find Minimum In Rotated Sorted ArrayMediumBinary SearchSolve
- Search In Rotated Sorted ArrayMediumBinary SearchSolve
- Search In Rotated Sorted Array IIMediumBinary SearchSolve
- Find in Mountain ArrayHardBinary SearchSolve
Median and Kth of Two Sorted Arrays
- Median of Two Sorted ArraysHardBinary SearchSolve
On Answer / Condition Function
- Koko Eating BananasMediumBinary SearchSolve
- Capacity to Ship Packages Within D DaysMediumBinary SearchSolve
- Split Array Largest SumHardBinary SearchSolve
Stack Patterns
Valid Parentheses Matching
- Valid ParenthesesEasyStackSolve
- Valid Parenthesis StringMediumGreedySolve
Monotonic Stack
- Daily TemperaturesMediumStackSolve
- Online Stock SpanMediumStackSolve
- Car FleetMediumStackSolve
Stack - Min Stack Design
- Min StackMediumStackSolve
- Maximum Frequency StackHardStackSolve
Simulation / Backtracking Helper
- Baseball GameEasyStackSolve
- Asteroid CollisionMediumStackSolve
- Simplify PathMediumStackSolve
- Decode StringMediumStackSolve
- Reconstruct ItineraryHardAdvanced GraphsSolve
String Manipulation Patterns
Repeated Substring Pattern Detection
- Greatest Common Divisor of StringsEasyMath & GeometrySolve
Naive / KMP / Rabin-Karp
- Longest Common PrefixEasyArrays & HashingSolve
Palindrome Check (Two Pointers / Reverse)
- Valid PalindromeEasyTwo PointersSolve
- Valid Palindrome IIEasyTwo PointersSolve
Integer and Roman Conversion
- Excel Sheet Column TitleEasyMath & GeometrySolve
- Roman to IntegerEasyMath & GeometrySolve
Heap (Priority Queue) Patterns
K-way Merge
- Merge K Sorted ListsHardLinked ListSolve
- Design TwitterMediumHeap / Priority QueueSolve
Top K Elements (Selection/Frequency)
- Top K Frequent ElementsMediumArrays & HashingSolve
- Kth Largest Element In a StreamEasyHeap / Priority QueueSolve
- Last Stone WeightEasyHeap / Priority QueueSolve
- K Closest Points to OriginMediumHeap / Priority QueueSolve
- Kth Largest Element In An ArrayMediumHeap / Priority QueueSolve
Scheduling / Minimum Cost (Greedy with Priority Queue)
- Single Threaded CPUMediumHeap / Priority QueueSolve
- Reorganize StringMediumHeap / Priority QueueSolve
- Longest Happy StringMediumHeap / Priority QueueSolve
- IPOHardHeap / Priority QueueSolve
- Meeting Rooms IIMediumIntervalsSolve
- Meeting Rooms IIIHardIntervalsSolve
- Minimum Interval to Include Each QueryHardIntervalsSolve
Two Heaps for Median Finding
- Find Median From Data StreamHardHeap / Priority QueueSolve
Tree Traversal Patterns (DFS & BFS)
Recursive Preorder Traversal
- Binary Tree Preorder TraversalEasyTreesSolve
- Invert Binary TreeEasyTreesSolve
- Same TreeEasyTreesSolve
- Insert into a Binary Search TreeMediumTreesSolve
- Construct Quad TreeMediumTreesSolve
- Count Good Nodes In Binary TreeMediumTreesSolve
- Construct Binary Tree From Preorder And Inorder TraversalMediumTreesSolve
Recursive Inorder Traversal
- Binary Tree Inorder TraversalEasyTreesSolve
- Delete Node in a BSTMediumTreesSolve
- Validate Binary Search TreeMediumTreesSolve
- Kth Smallest Element In a BstMediumTreesSolve
Level Order Traversal
- Binary Tree Level Order TraversalMediumTreesSolve
- Binary Tree Right Side ViewMediumTreesSolve
Recursive Postorder Traversal
- Binary Tree Postorder TraversalEasyTreesSolve
- Maximum Depth of Binary TreeEasyTreesSolve
- Diameter of Binary TreeEasyTreesSolve
- Balanced Binary TreeEasyTreesSolve
- House Robber IIIMediumTreesSolve
- Delete Leaves With a Given ValueMediumTreesSolve
- Binary Tree Maximum Path SumHardTreesSolve
Graph Traversal Patterns (DFS & BFS)
Graph DFS - Connected Components / Island Counting
- Island PerimeterEasyGraphsSolve
- Number of IslandsMediumGraphsSolve
- Max Area of IslandMediumGraphsSolve
- Pacific Atlantic Water FlowMediumGraphsSolve
- Surrounded RegionsMediumGraphsSolve
- Evaluate DivisionMediumGraphsSolve
Graph BFS - Connected Components / Island Counting
- Walls And GatesMediumGraphsSolve
- Rotting OrangesMediumGraphsSolve
- Word LadderHardGraphsSolve
Graph BFS - Topological Sort (Kahn's Algorithm)
- Course Schedule IVMediumGraphsSolve
- Minimum Height TreesMediumGraphsSolve
- Alien DictionaryHardAdvanced GraphsSolve
- Build a Matrix With ConditionsHardAdvanced GraphsSolve
Graph DFS - Cycle Detection (Directed Graph)
- Course ScheduleMediumGraphsSolve
- Course Schedule IIMediumGraphsSolve
Shortest Path (Bellman-Ford / BFS+K)
- Cheapest Flights Within K StopsMediumAdvanced GraphsSolve
Shortest Path (Dijkstra's Algorithm)
- Path with Minimum EffortMediumAdvanced GraphsSolve
- Network Delay TimeMediumAdvanced GraphsSolve
- Swim In Rising WaterHardAdvanced GraphsSolve
Deep Copy / Cloning
- Copy List With Random PointerMediumLinked ListSolve
- Clone GraphMediumGraphsSolve
Bridges & Articulation Points (Tarjan low-link)
- Find Critical and Pseudo Critical Edges in Minimum Spanning TreeHardAdvanced GraphsSolve
Union-Find (Disjoint Set Union - DSU)
- Graph Valid TreeMediumGraphsSolve
- Number of Connected Components In An Undirected GraphMediumGraphsSolve
- Redundant ConnectionMediumGraphsSolve
- Accounts MergeMediumGraphsSolve
- Greatest Common Divisor TraversalHardAdvanced GraphsSolve
Greedy Patterns
Jump Game Reachability/Minimization
- Jump GameMediumGreedySolve
- Jump Game IIMediumGreedySolve
Sorting Based
- Sort an ArrayMediumArrays & HashingSolve
- Lemonade ChangeEasyGreedySolve
- Hand of StraightsMediumGreedySolve
- Merge Triplets to Form Target TripletMediumGreedySolve
- CandyHardGreedySolve
Task Scheduling (Frequency Based)
- Task SchedulerMediumHeap / Priority QueueSolve
- Dota2 SenateMediumGreedySolve
Interval Merging/Scheduling
- Insert IntervalMediumIntervalsSolve
- Merge IntervalsMediumIntervalsSolve
- Non Overlapping IntervalsMediumIntervalsSolve
- Meeting RoomsEasyIntervalsSolve
Line Sweep
- Car PoolingMediumHeap / Priority QueueSolve
- Partition LabelsMediumGreedySolve
Gas Station Circuit
- Gas StationMediumGreedySolve
Backtracking Patterns
Word Search / Path Finding in Grid
- Word SearchMediumBacktrackingSolve
- Word Search IIHardTriesSolve
N-Queens / Constraint Satisfaction
- Matchsticks to SquareMediumBacktrackingSolve
- N QueensHardBacktrackingSolve
- N Queens IIHardBacktrackingSolve
Permutations
- PermutationsMediumBacktrackingSolve
- Permutations IIMediumBacktrackingSolve
Palindrome Partitioning
- Palindrome PartitioningMediumBacktrackingSolve
Combination Sum
- Combination SumMediumBacktrackingSolve
- Combination Sum IIMediumBacktrackingSolve
- Partition to K Equal Sum SubsetsMediumBacktrackingSolve
Subsets (Include/Exclude)
- Sum of All Subsets XOR TotalEasyBacktrackingSolve
- SubsetsMediumBacktrackingSolve
- CombinationsMediumBacktrackingSolve
- Subsets IIMediumBacktrackingSolve
- Letter Combinations of a Phone NumberMediumBacktrackingSolve
Dynamic Programming (DP) Patterns
2D Array (Edit Distance / Levenshtein Distance)
- Edit DistanceMedium2-D Dynamic ProgrammingSolve
- Regular Expression MatchingHard2-D Dynamic ProgrammingSolve
1D Array (Kadane's Algorithm for Max/Min Subarray)
- Maximum Product SubarrayMedium1-D Dynamic ProgrammingSolve
- Maximum SubarrayMediumGreedySolve
- Maximum Sum Circular SubarrayMediumGreedySolve
Interval DP
- Stone GameMedium2-D Dynamic ProgrammingSolve
- Stone Game IIMedium2-D Dynamic ProgrammingSolve
- Burst BalloonsHard2-D Dynamic ProgrammingSolve
2D Array (Unique Paths on Grid)
- Unique PathsMedium2-D Dynamic ProgrammingSolve
- Unique Paths IIMedium2-D Dynamic ProgrammingSolve
- Minimum Path SumMedium2-D Dynamic ProgrammingSolve
- Interleaving StringMedium2-D Dynamic ProgrammingSolve
- Longest Increasing Path In a MatrixHard2-D Dynamic ProgrammingSolve
1D Array (Fibonacci Style)
- Climbing StairsEasy1-D Dynamic ProgrammingSolve
- Min Cost Climbing StairsEasy1-D Dynamic ProgrammingSolve
- N-th Tribonacci NumberEasy1-D Dynamic ProgrammingSolve
- House RobberMedium1-D Dynamic ProgrammingSolve
- House Robber IIMedium1-D Dynamic ProgrammingSolve
- Decode WaysMedium1-D Dynamic ProgrammingSolve
- Integer BreakMedium1-D Dynamic ProgrammingSolve
- Stone Game IIIHard1-D Dynamic ProgrammingSolve
1D Array (0/1 Knapsack Subset Sum Style)
- Partition Equal Subset SumMedium1-D Dynamic ProgrammingSolve
- Last Stone Weight IIMedium2-D Dynamic ProgrammingSolve
- Target SumMedium2-D Dynamic ProgrammingSolve
2D Array (Longest Common Subsequence - LCS)
- Longest Common SubsequenceMedium2-D Dynamic ProgrammingSolve
- Distinct SubsequencesHard2-D Dynamic ProgrammingSolve
1D Array (Word Break Style)
- Word Break IIHardBacktrackingSolve
- Word BreakMedium1-D Dynamic ProgrammingSolve
Stock problems
- Best Time to Buy And Sell Stock IIMediumArrays & HashingSolve
- Best Time to Buy And Sell StockEasySliding WindowSolve
- Best Time to Buy And Sell Stock With CooldownMedium2-D Dynamic ProgrammingSolve
1D Array (Coin Change / Unbounded Knapsack Style)
- Coin ChangeMedium1-D Dynamic ProgrammingSolve
- Combination Sum IVMedium1-D Dynamic ProgrammingSolve
- Perfect SquaresMedium1-D Dynamic ProgrammingSolve
- Coin Change IIMedium2-D Dynamic ProgrammingSolve
Longest Increasing Subsequence (LIS)
- Longest Increasing SubsequenceMedium1-D Dynamic ProgrammingSolve
Bit Manipulation Patterns
Bitwise Operations - Power of Two/Four Check
- Pow(x, n)MediumMath & GeometrySolve
- Bitwise AND of Numbers RangeMediumBit ManipulationSolve
- Minimum Array EndMediumBit ManipulationSolve
Bitwise XOR - Finding Single/Missing Number
- Single NumberEasyBit ManipulationSolve
- Missing NumberEasyBit ManipulationSolve
- Sum of Two IntegersMediumBit ManipulationSolve
Bitwise DP - Counting Bits Optimization
- Counting BitsEasyBit ManipulationSolve
Bitwise AND - Counting Set Bits (Hamming Weight)
- Number of 1 BitsEasyBit ManipulationSolve
- Reverse BitsEasyBit ManipulationSolve
Design Patterns
Tries
- Implement Trie Prefix TreeMediumTriesSolve
- Design Add And Search Words Data StructureMediumTriesSolve
- Extra Characters in a StringMediumTriesSolve
Design (General/Specific)
- Design HashMapEasyArrays & HashingSolve
- Encode and Decode StringsMediumArrays & HashingSolve
- Implement Stack Using QueuesEasyStackSolve
- Implement Queue using StacksEasyStackSolve
- Time Based Key Value StoreMediumBinary SearchSolve
- Design Circular QueueMediumLinked ListSolve
- LRU CacheMediumLinked ListSolve
- LFU CacheHardLinked ListSolve
- Detect SquaresMediumMath & GeometrySolve
A study plan for the NeetCode 250
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-3: Arrays, two pointers, sliding window and stacks (59 problems)
Hash maps for lookups, the two pointer moves, when a window grows and shrinks, and the monotonic stack.
Weeks 4-5: Binary search and linked lists (28 problems)
Searching on the answer, not just the array, and pointer surgery on lists without losing a node.
Weeks 6-7: Trees, tries and heaps (39 problems)
Recursive DFS that returns something useful, level-order BFS, prefix trees, and top-k with a heap.
Weeks 8-9: Backtracking and graphs (47 problems)
Choose, explore, un-choose; grid BFS and DFS; union-find; topological sort; Dijkstra and minimum spanning trees.
Weeks 10-11: Dynamic programming (33 problems)
State, transition and base case, written out loud before any code; then the 2-D grid and string tables.
Week 12: Greedy, intervals, math and bits (44 problems)
Proving a greedy choice, sorting intervals by start, matrix walks, and XOR tricks.
Questions, answered
- What is the NeetCode 250?
- The NeetCode 250 is a list of 250 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 250 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 250 in?
- Every problem on the NeetCode 250 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 250 problems available on thita?
- All 250 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 unlimited AI coach sessions, 5 AI credits a month for Code Coach reviews and the free AI mock interview allowance. Editorials marked on this page are free to read. Pro adds 100 AI credits a month, more mock interviews and the remaining editorials.
- How long does the NeetCode 250 take?
- The plan on this page spreads it over twelve 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 250 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 150 is the natural shorter alternative.
Keep going
- Blind 75 sheet
- NeetCode 150 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.