A progression-based guide to mastering algorithm patterns through LeetCode solutions.
┌─────────────────────────────────────────────────────────────┐
│ LEARNING PATH │
├─────────────────────────────────────────────────────────────┤
│ │
│ TIER 1: Hash Map → Two Pointers → Binary Search │
│ │
│ TIER 2: Sliding Window → Stack → Monotonic Stack │
│ │
│ TIER 3: Tree DFS/BFS → Backtracking │
│ │
│ TIER 4: Graph DFS/BFS → Topological Sort → Union-Find │
│ │
│ TIER 5: 1D DP → 2D DP → Grid DP → Interval DP │
│ │
│ TIER 6: Trie → Greedy → Heap → Bit Manipulation │
│ │
└─────────────────────────────────────────────────────────────┘
| # | Pattern | Description | Detailed Guide |
|---|---|---|---|
| 1 | Binary Search 🔍 | Eliminate half each iteration | Guide |
| 2 | Two Pointers 👆 | Reduce O(n²) to O(n) | Guide |
| 3 | Sliding Window 🪟 | Incremental window updates | Guide |
| 4 | Linked List 🔗 | Pointer manipulation | Guide |
| 5 | Monotonic Stack 📚 | Next greater/smaller element | Guide |
| 6 | Graph (DFS/BFS) 🌳 | Tree/graph traversal | Guide |
| 7 | Dynamic Programming 📊 | Overlapping subproblems | Guide |
| 8 | Backtracking 🔄 | Explore all possibilities | Guide |
| 9 | Union-Find 🔗 | Disjoint set connectivity | Guide |
| 10 | Trie 🌲 | Prefix tree for strings | Guide |
| 11 | Heap 🏔️ | Priority queue / top-k | Guide |
| 12 | Greedy 💡 | Local optimal → global | Guide |
| 13 | Bit Manipulation 🔢 | Binary operations | Guide |
| Pattern | Template Snippet |
|---|---|
| Binary Search | while left <= right: mid = (left+right)//2 |
| Two Pointers | while left < right: # compare and move |
| Sliding Window | for right: expand; while invalid: shrink |
| Linked List | dummy = Node(0); dummy.next = head |
| Stack | if open: push; if close: pop and match |
| DFS | mark visited; for neighbors: recurse |
| DP | dp[i] = f(dp[i-1], ...) |
| Backtracking | choose; explore; unchoose |
- solutions/ - Comprehensive LeetCode solutions in Python.
- patterns/ - Detailed algorithm pattern guides and mind maps.
- PROGRESS.md - Tracked history of processed problems.
Solving Leetcode Solutions as I go. Each enhanced solution includes an INTUITION section explaining the technical "WHY" behind the logic.
| Command | What it does |
|---|---|
Continue |
Process next batch of files |
Resume from progress tracker |
Pick up where we left off |
Create mind map: [Name] |
Create new company/topic mind map |
git push |
Upload progress to GitHub |