Room 04 · The Grind
The Grind 250 / 250
Interval training for the head: the full 250, solved twice, every solution machine-verified.
The Grind · NeetCode 250
250 of 250 problems chip-timed
every one chip-timed
18 categories · 4 solutions each
60 easy · 155 medium · 35 hard
250 classic algorithm problems. Each one solved twice — an honest brute force to learn the course, then the optimized line — in both Java and Python, with hints that nudge before they spoil, and a coach's board that walks the pattern step by step.
✓ CHIP-TIMEDEVERY PUBLISHED SOLUTION RAN GREEN IN CI · JDK 21 · CPYTHON 3.12
01Arrays & Hashing22 / 22
- 001Concatenation of ArrayEASY✓ CHIP-TIMED
- 002Contains DuplicateEASY✓ CHIP-TIMED
- 003Valid AnagramEASY✓ CHIP-TIMED
- 004Two SumEASY✓ CHIP-TIMED
- 005Longest Common PrefixEASY✓ CHIP-TIMED
- 006Group AnagramsMEDIUM✓ CHIP-TIMED
- 007Remove ElementEASY✓ CHIP-TIMED
- 008Majority ElementEASY✓ CHIP-TIMED
- 009Design HashSetEASY✓ CHIP-TIMED
- 010Design HashMapEASY✓ CHIP-TIMED
- 011Sort an ArrayMEDIUM✓ CHIP-TIMED
- 012Sort ColorsMEDIUM✓ CHIP-TIMED
- 013Top K Frequent ElementsMEDIUM✓ CHIP-TIMED
- 014Encode and Decode StringsMEDIUM✓ CHIP-TIMED
- 015Range Sum Query 2D ImmutableMEDIUM✓ CHIP-TIMED
- 016Product of Array Except SelfMEDIUM✓ CHIP-TIMED
- 017Valid SudokuMEDIUM✓ CHIP-TIMED
- 018Longest Consecutive SequenceMEDIUM✓ CHIP-TIMED
- 019Best Time to Buy And Sell Stock IIMEDIUM✓ CHIP-TIMED
- 020Majority Element IIMEDIUM✓ CHIP-TIMED
- 021Subarray Sum Equals KMEDIUM✓ CHIP-TIMED
- 022First Missing PositiveHARD✓ CHIP-TIMED
02Two Pointers13 / 13
- 023Reverse StringEASY✓ CHIP-TIMED
- 024Valid PalindromeEASY✓ CHIP-TIMED
- 025Valid Palindrome IIEASY✓ CHIP-TIMED
- 026Merge Strings AlternatelyEASY✓ CHIP-TIMED
- 027Merge Sorted ArrayEASY✓ CHIP-TIMED
- 028Remove Duplicates From Sorted ArrayEASY✓ CHIP-TIMED
- 029Two Sum II Input Array Is SortedMEDIUM✓ CHIP-TIMED
- 0303SumMEDIUM✓ CHIP-TIMED
- 0314SumMEDIUM✓ CHIP-TIMED
- 032Rotate ArrayMEDIUM✓ CHIP-TIMED
- 033Container With Most WaterMEDIUM✓ CHIP-TIMED
- 034Boats to Save PeopleMEDIUM✓ CHIP-TIMED
- 035Trapping Rain WaterHARD✓ CHIP-TIMED
03Sliding Window9 / 9
- 036Contains Duplicate IIEASY✓ CHIP-TIMED
- 037Best Time to Buy And Sell StockEASY✓ CHIP-TIMED
- 038Longest Substring Without Repeating CharactersMEDIUM✓ CHIP-TIMED
- 039Longest Repeating Character ReplacementMEDIUM✓ CHIP-TIMED
- 040Permutation In StringMEDIUM✓ CHIP-TIMED
- 041Minimum Size Subarray SumMEDIUM✓ CHIP-TIMED
- 042Find K Closest ElementsMEDIUM✓ CHIP-TIMED
- 043Minimum Window SubstringHARD✓ CHIP-TIMED
- 044Sliding Window MaximumHARD✓ CHIP-TIMED
04Stack15 / 15
- 045Baseball GameEASY✓ CHIP-TIMED
- 046Valid ParenthesesEASY✓ CHIP-TIMED
- 047Implement Stack Using QueuesEASY✓ CHIP-TIMED
- 048Implement Queue using StacksEASY✓ CHIP-TIMED
- 049Min StackMEDIUM✓ CHIP-TIMED
- 050Evaluate Reverse Polish NotationMEDIUM✓ CHIP-TIMED
- 051Generate ParenthesesMEDIUM✓ CHIP-TIMED
- 052Asteroid CollisionMEDIUM✓ CHIP-TIMED
- 053Daily TemperaturesMEDIUM✓ CHIP-TIMED
- 054Online Stock SpanMEDIUM✓ CHIP-TIMED
- 055Car FleetMEDIUM✓ CHIP-TIMED
- 056Simplify PathMEDIUM✓ CHIP-TIMED
- 057Decode StringMEDIUM✓ CHIP-TIMED
- 058Maximum Frequency StackHARD✓ CHIP-TIMED
- 059Largest Rectangle In HistogramHARD✓ CHIP-TIMED
05Binary Search14 / 14
- 060Binary SearchEASY✓ CHIP-TIMED
- 061Search Insert PositionEASY✓ CHIP-TIMED
- 062Guess Number Higher Or LowerEASY✓ CHIP-TIMED
- 063Sqrt(x)EASY✓ CHIP-TIMED
- 064Search a 2D MatrixMEDIUM✓ CHIP-TIMED
- 065Koko Eating BananasMEDIUM✓ CHIP-TIMED
- 066Capacity to Ship Packages Within D DaysMEDIUM✓ CHIP-TIMED
- 067Find Minimum In Rotated Sorted ArrayMEDIUM✓ CHIP-TIMED
- 068Search In Rotated Sorted ArrayMEDIUM✓ CHIP-TIMED
- 069Search In Rotated Sorted Array IIMEDIUM✓ CHIP-TIMED
- 070Time Based Key Value StoreMEDIUM✓ CHIP-TIMED
- 071Split Array Largest SumHARD✓ CHIP-TIMED
- 072Median of Two Sorted ArraysHARD✓ CHIP-TIMED
- 073Find in Mountain ArrayHARD✓ CHIP-TIMED
06Linked List14 / 14
- 074Reverse Linked ListEASY✓ CHIP-TIMED
- 075Merge Two Sorted ListsEASY✓ CHIP-TIMED
- 076Linked List CycleEASY✓ CHIP-TIMED
- 077Reorder ListMEDIUM✓ CHIP-TIMED
- 078Remove Nth Node From End of ListMEDIUM✓ CHIP-TIMED
- 079Copy List With Random PointerMEDIUM✓ CHIP-TIMED
- 080Add Two NumbersMEDIUM✓ CHIP-TIMED
- 081Find The Duplicate NumberMEDIUM✓ CHIP-TIMED
- 082Reverse Linked List IIMEDIUM✓ CHIP-TIMED
- 083Design Circular QueueMEDIUM✓ CHIP-TIMED
- 084LRU CacheMEDIUM✓ CHIP-TIMED
- 085LFU CacheHARD✓ CHIP-TIMED
- 086Merge K Sorted ListsHARD✓ CHIP-TIMED
- 087Reverse Nodes In K GroupHARD✓ CHIP-TIMED
07Trees23 / 23
- 088Binary Tree Inorder TraversalEASY✓ CHIP-TIMED
- 089Binary Tree Preorder TraversalEASY✓ CHIP-TIMED
- 090Binary Tree Postorder TraversalEASY✓ CHIP-TIMED
- 091Invert Binary TreeEASY✓ CHIP-TIMED
- 092Maximum Depth of Binary TreeEASY✓ CHIP-TIMED
- 093Diameter of Binary TreeEASY✓ CHIP-TIMED
- 094Balanced Binary TreeEASY✓ CHIP-TIMED
- 095Same TreeEASY✓ CHIP-TIMED
- 096Subtree of Another TreeEASY✓ CHIP-TIMED
- 097Lowest Common Ancestor of a Binary Search TreeMEDIUM✓ CHIP-TIMED
- 098Insert into a Binary Search TreeMEDIUM✓ CHIP-TIMED
- 099Delete Node in a BSTMEDIUM✓ CHIP-TIMED
- 100Binary Tree Level Order TraversalMEDIUM✓ CHIP-TIMED
- 101Binary Tree Right Side ViewMEDIUM✓ CHIP-TIMED
- 102Construct Quad TreeMEDIUM✓ CHIP-TIMED
- 103Count Good Nodes In Binary TreeMEDIUM✓ CHIP-TIMED
- 104Validate Binary Search TreeMEDIUM✓ CHIP-TIMED
- 105Kth Smallest Element In a BstMEDIUM✓ CHIP-TIMED
- 106Construct Binary Tree From Preorder And Inorder TraversalMEDIUM✓ CHIP-TIMED
- 107House Robber IIIMEDIUM✓ CHIP-TIMED
- 108Delete Leaves With a Given ValueMEDIUM✓ CHIP-TIMED
- 109Binary Tree Maximum Path SumHARD✓ CHIP-TIMED
- 110Serialize And Deserialize Binary TreeHARD✓ CHIP-TIMED
08Heap / Priority Queue12 / 12
- 111Kth Largest Element In a StreamEASY✓ CHIP-TIMED
- 112Last Stone WeightEASY✓ CHIP-TIMED
- 113K Closest Points to OriginMEDIUM✓ CHIP-TIMED
- 114Kth Largest Element In An ArrayMEDIUM✓ CHIP-TIMED
- 115Task SchedulerMEDIUM✓ CHIP-TIMED
- 116Design TwitterMEDIUM✓ CHIP-TIMED
- 117Single Threaded CPUMEDIUM✓ CHIP-TIMED
- 118Reorganize StringMEDIUM✓ CHIP-TIMED
- 119Longest Happy StringMEDIUM✓ CHIP-TIMED
- 120Car PoolingMEDIUM✓ CHIP-TIMED
- 121Find Median From Data StreamHARD✓ CHIP-TIMED
- 122IPOHARD✓ CHIP-TIMED
09Backtracking16 / 16
- 123Sum of All Subsets XOR TotalEASY✓ CHIP-TIMED
- 124SubsetsMEDIUM✓ CHIP-TIMED
- 125Combination SumMEDIUM✓ CHIP-TIMED
- 126Combination Sum IIMEDIUM✓ CHIP-TIMED
- 127CombinationsMEDIUM✓ CHIP-TIMED
- 128PermutationsMEDIUM✓ CHIP-TIMED
- 129Subsets IIMEDIUM✓ CHIP-TIMED
- 130Permutations IIMEDIUM✓ CHIP-TIMED
- 131Word SearchMEDIUM✓ CHIP-TIMED
- 132Palindrome PartitioningMEDIUM✓ CHIP-TIMED
- 133Letter Combinations of a Phone NumberMEDIUM✓ CHIP-TIMED
- 134Matchsticks to SquareMEDIUM✓ CHIP-TIMED
- 135Partition to K Equal Sum SubsetsMEDIUM✓ CHIP-TIMED
- 136N QueensHARD✓ CHIP-TIMED
- 137N Queens IIHARD✓ CHIP-TIMED
- 138Word Break IIHARD✓ CHIP-TIMED
10Tries4 / 4
11Graphs21 / 21
- 143Island PerimeterEASY✓ CHIP-TIMED
- 144Verifying An Alien DictionaryEASY✓ CHIP-TIMED
- 145Find the Town JudgeEASY✓ CHIP-TIMED
- 146Number of IslandsMEDIUM✓ CHIP-TIMED
- 147Max Area of IslandMEDIUM✓ CHIP-TIMED
- 148Clone GraphMEDIUM✓ CHIP-TIMED
- 149Walls And GatesMEDIUM✓ CHIP-TIMED
- 150Rotting OrangesMEDIUM✓ CHIP-TIMED
- 151Pacific Atlantic Water FlowMEDIUM✓ CHIP-TIMED
- 152Surrounded RegionsMEDIUM✓ CHIP-TIMED
- 153Open The LockMEDIUM✓ CHIP-TIMED
- 154Course ScheduleMEDIUM✓ CHIP-TIMED
- 155Course Schedule IIMEDIUM✓ CHIP-TIMED
- 156Graph Valid TreeMEDIUM✓ CHIP-TIMED
- 157Course Schedule IVMEDIUM✓ CHIP-TIMED
- 158Number of Connected Components In An Undirected GraphMEDIUM✓ CHIP-TIMED
- 159Redundant ConnectionMEDIUM✓ CHIP-TIMED
- 160Accounts MergeMEDIUM✓ CHIP-TIMED
- 161Evaluate DivisionMEDIUM✓ CHIP-TIMED
- 162Minimum Height TreesMEDIUM✓ CHIP-TIMED
- 163Word LadderHARD✓ CHIP-TIMED
12Advanced Graphs10 / 10
- 164Path with Minimum EffortMEDIUM✓ CHIP-TIMED
- 165Network Delay TimeMEDIUM✓ CHIP-TIMED
- 166Reconstruct ItineraryHARD✓ CHIP-TIMED
- 167Min Cost to Connect All PointsMEDIUM✓ CHIP-TIMED
- 168Swim In Rising WaterHARD✓ CHIP-TIMED
- 169Alien DictionaryHARD✓ CHIP-TIMED
- 170Cheapest Flights Within K StopsMEDIUM✓ CHIP-TIMED
- 171Find Critical and Pseudo Critical Edges in Minimum Spanning TreeHARD✓ CHIP-TIMED
- 172Build a Matrix With ConditionsHARD✓ CHIP-TIMED
- 173Greatest Common Divisor TraversalHARD✓ CHIP-TIMED
131-D Dynamic Programming17 / 17
- 174Climbing StairsEASY✓ CHIP-TIMED
- 175Min Cost Climbing StairsEASY✓ CHIP-TIMED
- 176N-th Tribonacci NumberEASY✓ CHIP-TIMED
- 177House RobberMEDIUM✓ CHIP-TIMED
- 178House Robber IIMEDIUM✓ CHIP-TIMED
- 179Longest Palindromic SubstringMEDIUM✓ CHIP-TIMED
- 180Palindromic SubstringsMEDIUM✓ CHIP-TIMED
- 181Decode WaysMEDIUM✓ CHIP-TIMED
- 182Coin ChangeMEDIUM✓ CHIP-TIMED
- 183Maximum Product SubarrayMEDIUM✓ CHIP-TIMED
- 184Word BreakMEDIUM✓ CHIP-TIMED
- 185Longest Increasing SubsequenceMEDIUM✓ CHIP-TIMED
- 186Partition Equal Subset SumMEDIUM✓ CHIP-TIMED
- 187Combination Sum IVMEDIUM✓ CHIP-TIMED
- 188Perfect SquaresMEDIUM✓ CHIP-TIMED
- 189Integer BreakMEDIUM✓ CHIP-TIMED
- 190Stone Game IIIHARD✓ CHIP-TIMED
142-D Dynamic Programming16 / 16
- 191Unique PathsMEDIUM✓ CHIP-TIMED
- 192Unique Paths IIMEDIUM✓ CHIP-TIMED
- 193Minimum Path SumMEDIUM✓ CHIP-TIMED
- 194Longest Common SubsequenceMEDIUM✓ CHIP-TIMED
- 195Last Stone Weight IIMEDIUM✓ CHIP-TIMED
- 196Best Time to Buy And Sell Stock With CooldownMEDIUM✓ CHIP-TIMED
- 197Coin Change IIMEDIUM✓ CHIP-TIMED
- 198Target SumMEDIUM✓ CHIP-TIMED
- 199Interleaving StringMEDIUM✓ CHIP-TIMED
- 200Stone GameMEDIUM✓ CHIP-TIMED
- 201Stone Game IIMEDIUM✓ CHIP-TIMED
- 202Longest Increasing Path In a MatrixHARD✓ CHIP-TIMED
- 203Distinct SubsequencesHARD✓ CHIP-TIMED
- 204Edit DistanceMEDIUM✓ CHIP-TIMED
- 205Burst BalloonsHARD✓ CHIP-TIMED
- 206Regular Expression MatchingHARD✓ CHIP-TIMED
15Greedy14 / 14
- 207Lemonade ChangeEASY✓ CHIP-TIMED
- 208Maximum SubarrayMEDIUM✓ CHIP-TIMED
- 209Maximum Sum Circular SubarrayMEDIUM✓ CHIP-TIMED
- 210Longest Turbulent SubarrayMEDIUM✓ CHIP-TIMED
- 211Jump GameMEDIUM✓ CHIP-TIMED
- 212Jump Game IIMEDIUM✓ CHIP-TIMED
- 213Jump Game VIIMEDIUM✓ CHIP-TIMED
- 214Gas StationMEDIUM✓ CHIP-TIMED
- 215Hand of StraightsMEDIUM✓ CHIP-TIMED
- 216Dota2 SenateMEDIUM✓ CHIP-TIMED
- 217Merge Triplets to Form Target TripletMEDIUM✓ CHIP-TIMED
- 218Partition LabelsMEDIUM✓ CHIP-TIMED
- 219Valid Parenthesis StringMEDIUM✓ CHIP-TIMED
- 220CandyHARD✓ CHIP-TIMED
16Intervals7 / 7
17Math & Geometry13 / 13
- 228Excel Sheet Column TitleEASY✓ CHIP-TIMED
- 229Greatest Common Divisor of StringsEASY✓ CHIP-TIMED
- 230Insert Greatest Common Divisors in Linked ListMEDIUM✓ CHIP-TIMED
- 231Transpose MatrixEASY✓ CHIP-TIMED
- 232Rotate ImageMEDIUM✓ CHIP-TIMED
- 233Spiral MatrixMEDIUM✓ CHIP-TIMED
- 234Set Matrix ZeroesMEDIUM✓ CHIP-TIMED
- 235Happy NumberEASY✓ CHIP-TIMED
- 236Plus OneEASY✓ CHIP-TIMED
- 237Roman to IntegerEASY✓ CHIP-TIMED
- 238Pow(x, n)MEDIUM✓ CHIP-TIMED
- 239Multiply StringsMEDIUM✓ CHIP-TIMED
- 240Detect SquaresMEDIUM✓ CHIP-TIMED
18Bit Manipulation10 / 10
- 241Single NumberEASY✓ CHIP-TIMED
- 242Number of 1 BitsEASY✓ CHIP-TIMED
- 243Counting BitsEASY✓ CHIP-TIMED
- 244Add BinaryEASY✓ CHIP-TIMED
- 245Reverse BitsEASY✓ CHIP-TIMED
- 246Missing NumberEASY✓ CHIP-TIMED
- 247Sum of Two IntegersMEDIUM✓ CHIP-TIMED
- 248Reverse IntegerMEDIUM✓ CHIP-TIMED
- 249Bitwise AND of Numbers RangeMEDIUM✓ CHIP-TIMED
- 250Minimum Array EndMEDIUM✓ CHIP-TIMED