Month 2 — Patterns Mastery
Theme: Stop solving problems case-by-case. Start recognizing the pattern, then dispatching the right template. Weeks 5–8 trade depth on individual data structures for breadth of patterns — graphs, two-pointers, sliding windows, monotonic stacks, intervals, backtracking, trie, two-heaps. By month’s end, you should be able to look at a problem statement and call out the pattern name within 30 seconds.
Weekly breakdown
-
Week 5 — Graphs Intro: BFS, DFS, and the Topological Mindset (README) Number of Islands · Clone Graph · Course Schedule · Pacific Atlantic · Word Ladder
-
Week 6 — Two Pointers, Sliding Window, Prefix Sums (planned)
-
Week 7 — Monotonic Stacks, Intervals, Greedy (planned)
-
Week 8 — Backtracking, Trie, Two Heaps (planned)
Milestones
By end of Month 2:
- Recognize the 8 core algorithmic patterns from problem statement alone (BFS/DFS, two-pointer, sliding window, prefix sum, monotonic stack, interval-sort, backtracking, two-heap)
- Write canonical BFS / DFS / topo sort / multi-source BFS templates from memory
- Solve LC Medium graph + sliding-window problems in 25 minutes
- Articulate when each pattern applies AND when it doesn’t (the “negative space” matters as much)
Required cross-references
phase-04-graphs/labs/— every Week 5 problem cross-references a lab herephase-02-patterns/labs/lab-01-two-pointers.md— Week 6 base readingFRAMEWORK.md— every problem walks the 9-step frameworkSPACED_REPETITION.md— re-solve schedule for prior weeks during this month