Semester 2: Algorithms & Data Structures
Year 1 -- Fundamentals | Phase 2 | Weeks 22-31 | 10 weeks
Semester 2 is roadmap-visible as Blueprint in the canonical readiness matrix. Use this algorithms material as structure and planning context until content/portal/readiness-matrix.json promotes it to Learner-ready or beyond.
Goal
Build algorithmic sophistication and data structure fluency strong enough that later systems work is grounded in precise reasoning rather than intuition alone. Develop the ability to analyze runtime complexity, justify correctness using mathematical reasoning, and choose appropriate algorithmic approaches based on problem characteristics and constraints.
Prerequisites
Complete Semester 1: Mathematical Foundations including checkpoint gate and cumulative review. You must have solid proof techniques, combinatorial reasoning, mathematical problem-solving skills, and demonstrated ability to implement and verify computational algorithms.
Phase Completion Contract
- Explain: asymptotic growth, practical correctness reasoning, graph-traversal choices, and greedy-vs-DP tradeoffs.
- Build: a tested algorithms repo with implementations, analysis notes, and benchmark or comparison evidence.
- Evidence: runtime writeups, problem classifications, reviewed code, and artifact history in Git.
- Do not advance if: you are still choosing data structures or paradigms by guessing, or cannot analyze core solutions without external prompting.
Modules
| # | Module | Focus |
|---|---|---|
| 1 | Algorithm Analysis & Design Paradigms | Asymptotic analysis, correctness proofs, divide-and-conquer, recursion patterns - 18 concept pages |
| 2 | Sorting, Searching & Fundamental Structures | Comparison sorts, hash tables, heaps, priority queues - 16 concept pages |
| 3 | Graph Algorithms & Network Analysis | Graph representations, traversals, shortest paths, spanning trees, network flow - 20 concept pages |
| 4 | Dynamic Programming & Optimization | Optimal substructure, memoization, classical DP problems, greedy vs DP trade-offs - 17 concept pages |
| 5 | Advanced Data Structures & Amortized Analysis | Balanced trees, union-find, advanced heaps, amortized complexity reasoning - 19 concept pages |
Core Resources
| Book | Role |
|---|---|
| The Algorithm Design Manual (Skiena) | Primary / problem-driven reference |
| Introduction to Algorithms (CLRS) | Reference / proofs and depth |
| Algorithms (Sedgewick) | Selective / implementations and visual intuition |
Non-Technical Parallel Reading
| Book | Theme |
|---|---|
| The Checklist Manifesto | Building disciplined problem-solving habits under time pressure |
Cross-Cutting Tracks Active This Semester
| Track | Level | Focus This Semester |
|---|---|---|
| A: Testing | Level 1 | Unit tests for every algorithm implementation; add simple property checks for sort, search, and set-like behavior |
| B: Git / CI/CD | Level 2 | Use a dedicated algorithms repo with linting, formatting, and small reviewed commits after each problem set |
| E: Engineering Fundamentals | Level 2 | Profiling basics, debugging failing implementations, and writing short analysis notes beside code |
| C: Security | - | Not a primary focus yet |
| D: Observability | - | Not a primary focus yet |
Weekly Arc
| Week | Focus | Modules |
|---|---|---|
| 22 | Asymptotics and correctness | Module 1: growth rates, loop counting, recursion traces |
| 23 | Divide-and-conquer and recurrence thinking | Module 1 deepening, first timed analysis drills |
| 24 | Sorting and searching | Module 2: binary search, merge/quicksort, heap intuition |
| 25 | Core structures and implementation tradeoffs | Module 2: arrays, heaps, hash-table intuition, testing patterns |
| 26 | Graph representations and traversals | Module 3: BFS, DFS, connected components, shortest-path setup |
| 27 | Weighted graphs and spanning trees | Module 3: Dijkstra, MST intuition, graph problem classification |
| 28 | Dynamic programming foundations | Module 4: recurrence design, memoization, tabulation |
| 29 | Greedy choice and proof instinct | Module 4: exchange arguments, greedy-vs-DP tradeoffs |
| 30 | Advanced structures | Module 5: balanced trees, union-find, amortized analysis |
| 31 | Integration and assessment | Semester project, cumulative review, exam prep, weak-area repair |
Spaced Repetition Schedule
Use short daily reviews. Algorithms decay fast if retrieval is delayed.
| Week | New Deck | Review Decks |
|---|---|---|
| 22 | M1 asymptotics and recurrence cards | Semester 1 proof and discrete structures cards |
| 23 | M1 correctness and divide-and-conquer cards | M1 + selected Semester 1 math cards |
| 24 | M2 sorting and search cards | M1 maintenance review |
| 25 | M2 structures and tradeoff cards | M1 + M2 interleaved review |
| 26 | M3 graph vocabulary cards | M2 + selected Semester 0 algorithm-intuition cards |
| 27 | M3 graph algorithm pattern cards | M1-M3 review |
| 28 | M4 DP foundations cards | M3 maintenance review |
| 29 | M4 greedy tradeoff cards | M2-M4 interleaved review |
| 30 | M5 data-structure and amortization cards | M1-M5 review |
| 31 | No major new deck | Full Semester 2 consolidation review |
Weekly Learning Journal Schedule
Use the template at _templates/weekly-journal.md every week. Specific reflection prompts for this semester:
- How did this week's problem change your intuition about complexity?
- Where did a naive implementation mislead you before analysis?
- What invariant, proof sketch, or recurrence is worth preserving as a flashcard?
Semester Deliverables
- All module quizzes completed
- All code katas completed
- All Feynman notes written
- All spaced repetition decks created
- Semester project completed
- Checkpoint gate passed
- Cumulative review completed
- Semester exam completed
Capstone Throughline
Every semester must leave behind evidence that can survive into the final capstone defense.
- Artifact carried forward: algorithms repo and benchmark notes.
- What to preserve: Preserve implementations, complexity notes, input generators, benchmark results, and analysis of where theory matched or missed observed behavior.
- Module threads: Module 1: Algorithm Analysis & Design Paradigms, Module 2: Sorting, Searching & Fundamental Structures, Module 3: Graph Algorithms & Network Analysis, Module 4: Dynamic Programming & Optimization, and Module 5: Advanced Data Structures & Amortized Analysis.
- Defense prompt: In Semester 10, explain how this semester's artifact changed a capstone decision, reduced a risk, or made the final system easier to defend.
Model Artifact Calibration
Use the algorithm benchmark note model artifact to calibrate benchmark questions, measurements, interpretation, and decisions.