LeetCode Hard.
Solved Systematically.
Stop guessing. Learn the 20 patterns that cover 80% of all Hard problems — then practice 100 walkthroughs until pattern recognition becomes instinct.
📅 Weeks 13–16
🎯 20 Core Patterns
💀 100 Hard Walkthroughs
⏱ Mock Contests
Phase 5 Modules
Four-Part System
Pattern recognition → Walkthrough practice → Timed simulation → Volume practice
Pattern Cheatsheet Preview
20 Patterns to Rule Them All
Click any pattern to see the full template and practice problems
01 ·
Sliding Window
Subarray/substring problems
3M5H
02 ·
Two Pointers
Sorted arrays, pairs, triplets
3M4H
03 ·
Fast & Slow Pointers
Cycle detection in linked lists
2M3H
04 ·
Merge Intervals
Overlapping ranges
4M5H
05 ·
Cyclic Sort
Range [1,n] arrays
2M3H
06 ·
LL In-place Reversal
Sublist reversal problems
2M5H
07 ·
Tree BFS
Level-order traversal
4M5H
08 ·
Tree DFS
Path sum, tree structure
4M5H
09 ·
Two Heaps
Median tracking, splits
2M5H
10 ·
Subsets
All permutations, combos
3M4H
11 ·
Modified Binary Search
Rotated/infinite arrays
3M5H
12 ·
Bitwise XOR
Missing/duplicate numbers
2M3H
13 ·
Top K Elements
Heap + sorting hybrid
3M4H
14 ·
K-way Merge
Merge sorted lists
2M5H
15 ·
Knapsack DP
0/1 choice problems
3M5H
16 ·
Unbounded Knapsack
Coin change variants
3M4H
17 ·
Fibonacci DP
House robber, staircase
2M4H
18 ·
Palindromic DP
LPS, palindrome count
2M5H
19 ·
LCS Pattern
Edit distance, matching
3M5H
20 ·
Topological Sort
Task scheduling, DAG
3M5H
Hard Problem Preview
Sample Walkthroughs
Each problem: intuition → pattern → dry run → clean code
#84
Largest Rectangle in Histogram HARD
Pattern: Monotonic Stack
Given an array of bar heights, find the largest rectangle. Key insight: for each bar, find the nearest shorter bar on both sides using a monotonic stack.
StackArrayO(n)
#76
Minimum Window Substring HARD
Pattern: Sliding Window
Find smallest window in s containing all chars of t. Use two pointers + frequency map. Shrink from left when all chars covered, expand right otherwise.
Sliding WindowHashMapO(n)
#295
Find Median from Data Stream HARD
Pattern: Two Heaps
Maintain two heaps: max-heap for lower half, min-heap for upper half. Balance their sizes to get median in O(1). Insert in O(log n).
Two HeapsO(log n)Design
#124
Binary Tree Maximum Path Sum HARD
Pattern: Tree DFS
At each node, a path can: go up to parent, bend through the node (left + node + right), or just take one branch. Track global max, return best branch to parent.
Tree DFSRecursionO(n)
Mock Contest Simulator
Simulate real LeetCode contest pressure. Timer counts down. After each contest, see which patterns you missed and get targeted practice.
Start Mock Contest →