Module 43
The Core 100
One hundred problems from across the course that cover every major pattern, in an order that builds from easy foundations to hard capstones.
After learning the patterns module by module, you need a single list to practise and revise from. The Core 100 picks, for each important pattern, the problems that teach it best, and orders them so each set builds on the last: 25 easy foundations, 55 medium core problems, and 20 hard capstones.
Every problem lives in its own module, with full lessons, traces and Java solutions, so marking it complete there counts here too. Use the lessons below to plan a schedule and a revision routine.
Best after: Pattern Recognition Drills
Unlocks next: 44. Interview Method and Simulation
Part 1
Learn the ideas
- 43.1How the List Is Built and How to Use ItEvery major pattern appears at least once, the most common interview patterns several times. Work through the sets in order, roughly 10–15 problems a week.10 min
- 43.2Solving and Revising WellSolve, then re-solve from a blank file after 1, 3, 7 and 21 days. Track the pattern, the key insight and the mistake for every problem you missed.10 min
Set 1 · 25 problems
Foundation set (easy)
One clean example of each basic tool. Aim for 15–25 minutes each and a correct solution on the first run.
- 1.Two SumEasyModule 4Hash Map Lookup (Complement)
- 2.Valid AnagramEasyModule 4Frequency Counting
- 3.Contains DuplicateEasyModule 1Hash Map Lookup (Complement)
- 4.Best Time to Buy and Sell StockEasyModule 2Running State in One Pass
- 5.Majority ElementEasyModule 2Running State in One Pass
- 6.Missing NumberEasyModule 2Index as Hash (Cyclic Sort)
- 7.Valid PalindromeEasyModule 3Two Pointers: Opposite Ends
- 8.Move ZeroesEasyModule 6Two Pointers: Read and Write
- 9.Squares of a Sorted ArrayEasyModule 6Two Pointers: Opposite Ends
- 10.Find Pivot IndexEasyModule 5Prefix Sum
- 11.Maximum Average SubarrayEasyModule 7Sliding Window: Fixed Size
- 12.Reverse Linked ListEasyModule 9In-Place Linked List Reversal
- 13.Merge Two Sorted ListsEasyModule 9Dummy Head and Merging
- 14.Linked List CycleEasyModule 9Fast and Slow Pointers
- 15.Middle of the Linked ListEasyModule 9Fast and Slow Pointers
- 16.Valid ParenthesesEasyModule 10Stack for Matching and Undo
- 17.Binary SearchEasyModule 12Binary Search on an Index
- 18.Maximum Depth of Binary TreeEasyModule 17Tree DFS
- 19.Invert Binary TreeEasyModule 17Tree DFS
- 20.Diameter of Binary TreeEasyModule 17Tree DFS
- 21.Convert Sorted Array to BSTEasyModule 18BST Ordering
- 22.Climbing StairsEasyModule 291D Dynamic Programming
- 23.Find the Town JudgeEasyModule 21Graph BFS
- 24.Flood FillEasyModule 23Graph DFS and Flood Fill
- 25.Single NumberEasyModule 13Bit Manipulation
Set 2 · 55 problems
Core set (medium)
The patterns interviews ask most often. Aim for 30–40 minutes each; say the brute force first, then optimise.
- 1.Group AnagramsMediumModule 4Frequency Counting
- 2.Top K Frequent ElementsMediumModule 4Frequency Counting
- 3.Longest Consecutive SequenceMediumModule 4Hash Map Lookup (Complement)
- 4.Product of Array Except SelfMediumModule 5Prefix Sum
- 5.Subarray Sum Equals KMediumModule 5Prefix Sum + Hash Map
- 6.Maximum SubarrayMediumModule 2Kadane's Algorithm
- 7.3SumMediumModule 6Two Pointers: Opposite Ends
- 8.Container With Most WaterMediumModule 6Two Pointers: Opposite Ends
- 9.Longest Substring Without Repeating CharactersMediumModule 7Sliding Window: Variable Size
- 10.Longest Repeating Character ReplacementMediumModule 7Sliding Window: Variable Size
- 11.Remove Nth Node From EndMediumModule 9Dummy Head and Merging
- 12.Add Two NumbersMediumModule 9Dummy Head and Merging
- 13.Min StackMediumModule 10Combine Structures to Design
- 14.Daily TemperaturesMediumModule 10Monotonic Stack
- 15.Decode StringMediumModule 10Stack for Matching and Undo
- 16.Search in Rotated Sorted ArrayMediumModule 12Binary Search on an Index
- 17.Koko Eating BananasMediumModule 12Binary Search on the Answer
- 18.SubsetsMediumModule 14Backtracking
- 19.PermutationsMediumModule 14Backtracking
- 20.Combination SumMediumModule 14Backtracking
- 21.Word SearchMediumModule 14Backtracking
- 22.Kth Largest Element in an ArrayMediumModule 15Divide and Conquer
- 23.Merge IntervalsMediumModule 16Merge Intervals
- 24.Insert IntervalMediumModule 16Merge Intervals
- 25.Non-overlapping IntervalsMediumModule 16Greedy Choice
- 26.Meeting Rooms IIMediumModule 16Merge Intervals
- 27.Binary Tree Level Order TraversalMediumModule 17Tree BFS (Level Order)
- 28.Lowest Common Ancestor of a Binary TreeMediumModule 17Tree DFS
- 29.Construct Binary Tree from Preorder and InorderMediumModule 17Tree DFS
- 30.Validate Binary Search TreeMediumModule 18BST Ordering
- 31.Kth Smallest Element in a BSTMediumModule 18BST Ordering
- 32.K Closest Points to OriginMediumModule 19Top K with a Heap
- 33.Task SchedulerMediumModule 19Top K with a Heap
- 34.Implement Trie (Prefix Tree)MediumModule 20Trie (Prefix Tree)
- 35.Number of IslandsMediumModule 23Graph DFS and Flood Fill
- 36.Rotting OrangesMediumModule 22Graph BFS
- 37.Clone GraphMediumModule 23Graph DFS and Flood Fill
- 38.Course ScheduleMediumModule 24Topological Sort
- 39.Course Schedule IIMediumModule 25Topological Sort
- 40.Accounts MergeMediumModule 26Union-Find
- 41.Redundant ConnectionMediumModule 24Union-Find
- 42.Network Delay TimeMediumModule 27Dijkstra's Shortest Path
- 43.Cheapest Flights Within K StopsMediumModule 27Dijkstra's Shortest Path
- 44.Min Cost to Connect All PointsMediumModule 28Minimum Spanning Tree
- 45.House RobberMediumModule 291D Dynamic Programming
- 46.Word BreakMediumModule 291D Dynamic Programming
- 47.Unique PathsMediumModule 30Grid DP
- 48.Coin ChangeMediumModule 31Knapsack DP
- 49.Partition Equal Subset SumMediumModule 31Knapsack DP
- 50.Longest Increasing SubsequenceMediumModule 32Longest Increasing Subsequence
- 51.Longest Common SubsequenceMediumModule 32DP on Two Strings
- 52.Edit DistanceMediumModule 32DP on Two Strings
- 53.Jump GameMediumModule 34Greedy Choice
- 54.Gas StationMediumModule 34Greedy Choice
- 55.LRU CacheMediumModule 40Combine Structures to Design
Set 3 · 20 problems
Capstone set (hard)
Classics that combine two or more ideas. Give yourself up to an hour; it's normal to need a hint. Re-solve each one a week later.
- 1.Trapping Rain WaterHardModule 6Two Pointers: Opposite Ends
- 2.Minimum Window SubstringHardModule 7Sliding Window: Variable Size
- 3.Sliding Window MaximumHardModule 11Monotonic Deque
- 4.Largest Rectangle in HistogramHardModule 10Monotonic Stack
- 5.Merge K Sorted ListsHardModule 9K-Way Merge
- 6.Median of Two Sorted ArraysHardModule 12Binary Search on an Index
- 7.N-QueensHardModule 14Backtracking
- 8.Binary Tree Maximum Path SumHardModule 17Tree DFS
- 9.Find Median from Data StreamHardModule 19Two Heaps
- 10.Word Search IIHardModule 20Trie (Prefix Tree)
- 11.Word LadderHardModule 22Graph BFS
- 12.Alien DictionaryHardModule 25Topological Sort
- 13.Swim in Rising WaterHardModule 27Dijkstra's Shortest Path
- 14.Burst BalloonsHardModule 33Interval DP
- 15.Wildcard MatchingHardModule 32DP on Two Strings
- 16.Dungeon GameHardModule 30Grid DP
- 17.CandyHardModule 34Greedy Choice
- 18.LFU CacheHardModule 40Combine Structures to Design
- 19.Count of Smaller Numbers After SelfHardModule 36Range Queries (Fenwick & Segment Trees)
- 20.Serialize and Deserialize Binary TreeHardModule 17Tree DFS