~/roadmap — zsh
$ git log --oneline --all | wc -l
0
$ ./init --weeks 32 --stack cpp,discrete-math,neetcode
phase 0 [launchpad] queued
phase 1‑8 [algorithms + data structures] queued
phase 9 [capstone] queued
status: clean slate

Clean the GitHub. Build it back.

A 32-week rebuild of algorithms, C++, and discrete math from first principles — then a straight look at what it does and doesn't buy you toward a compiler, a distributed KV store, and a real microservices system.

10phases
25projects
~150neetcode problems
32weeks
0 / 0 problems checked

The 32-week build

Each phase pairs syllabus reading with a couple of from-scratch C++ projects, then locks it in with Neetcode. Check off problems as you go — the bar up top tracks the whole roadmap.

Phase 0 — The Launchpad

Building the foundation

Weeks 1–2

Reading

Discrete Math (Lewis & Zax)

  • Ch 2 — Basic Proof Techniques
  • Ch 3 — Proof by Mathematical Induction
  • Ch 4 — Strong Induction
  • Ch 5 — Sets

C++ (Tour of C++)

  • Ch 1 — The Basics
  • Ch 2 — User-Defined Types
  • Ch 3 — Modularity

Micro-projects

0.1 — Prime Number Tester with Proof

Checks primality with a --verify flag that prints the loop invariant, plus the inductive proof as a comment.

functionsCLI argsbool / loops

0.2 — Summation Calculator

Computes 1+2+…+n by loop and by closed form, proves they're equal, benchmarks both with std::chrono.

long longstd::chrono

Neetcode

None yet — pure math and C++ warm-up.

Phase 1 — Foundations of Algorithm Analysis

Syllabus Ch 1–5

Weeks 3–4

Reading

Algorithms syllabus

  • Ch 1 — Role of Algorithms & Data Structures
  • Ch 2 — Mathematical Preliminaries
  • Ch 3 — Growth of Functions / Asymptotic Notation
  • Ch 4 — Analyzing Recursive & Nonrecursive Algorithms
  • Ch 5 — The Model of Computation

Discrete Math

  • Ch 21 — Order Notation
  • Ch 24 — Series

C++

  • Ch 4 — Classes
  • Ch 5 — Essential Operations (Copy/Move)

Micro-projects

1.1 — Big-O Visualizer

Runs O(1), O(n), O(n²) functions across n=10…10,000 and checks the measured growth against theory.

std::vectorstd::chronopass-by-ref

1.2 — Recursion vs Iteration Benchmark

Fibonacci three ways — recursive, iterative DP, closed-form — with runtime and call-stack depth compared.

recursionstd::function

Neetcode — Arrays & Hashing

Phase 2 — Elementary Data Structures

Syllabus Ch 6–9

Weeks 5–7

Reading

Algorithms syllabus

  • Ch 6 — Stacks, Queues, Deques
  • Ch 7 — Linked Lists
  • Ch 8 — Hashing & Hash Tables
  • Ch 9 — Skiplists

Discrete Math

  • Ch 5 — Sets
  • Ch 22 — Counting
  • Ch 23 — Counting Subsets

C++

  • Ch 6 — Templates
  • Ch 11 — Containers

Micro-projects

2.1 — DIY Vector

Vector<T> with dynamic resizing, push_back/pop_back, and proper copy/move semantics.

templatesRAIImove semantics

2.2 — Stack-Based RPN Calculator

Postfix calculator on a hand-rolled Stack<T>, with error handling for bad input and division by zero.

exceptionsstring parsing

2.3 — Word Frequency Counter

Counts word frequency with std::unordered_map, then a hand-rolled HashMap<K,V> benchmarked against it.

ifstreamcustom hash

Neetcode

Linked List

Stack

Hash Map

Phase 3 — Sorting & Design Paradigms

Syllabus Ch 10–12, 18–19

Weeks 8–10

Reading

Algorithms syllabus

  • Ch 10 — Divide-and-Conquer: Mergesort, Quicksort, Recurrences
  • Ch 11 — Decrease-and-Conquer: Insertion Sort, Binary Search
  • Ch 12 — Transform-and-Conquer: Heaps, Horner's Rule
  • Ch 18 — Comparison-Based Sorting Lower Bound
  • Ch 19 — Counting & Radix Sort

Discrete Math

  • Ch 24 — Series
  • Ch 25 — Recurrence Relations

C++

  • Ch 12 — Algorithms (std::sort, lambdas)
  • Ch 14 — Random Numbers

Micro-projects

3.1 — Sorting Showdown

Bubble, insertion, merge, quicksort benchmarked across n=100…100,000 with a runtime table.

std::randomlambdas

3.2 — Dutch National Flag

3-way partition in O(n) time, O(1) space, with a written proof of the bound.

iteratorsin-place swap

3.3 — Binary Search on Custom Data

Binary search over sorted structs loaded from CSV, searchable by different fields via custom comparators.

std::lower_bound

Neetcode — Sorting & Divide and Conquer

Phase 4 — Trees, Heaps & Advanced Structures

Syllabus Ch 13–17

Weeks 11–14

Reading

Algorithms syllabus

  • Ch 13 — Binary Trees & BSTs
  • Ch 14 — Randomized/Self-Balancing Trees
  • Ch 15 — Red-Black, AVL, 2-4 Trees
  • Ch 16 — Heaps & Heapsort
  • Ch 17 — Meldable & Mergeable Heaps

Discrete Math

  • Ch 16 — Undirected Graphs
  • Ch 17 — Connectivity
  • Ch 18 — Coloring (optional)

C++

  • Ch 7 — Concepts & Generic Programming
  • Ch 13 — Utilities (unique_ptr, span)

Micro-projects

4.1 — DIY Binary Search Tree

BST<T> with insert/search/erase, all three traversals, and min/max/successor/predecessor.

std::unique_ptrrecursion

4.2 — Autocomplete with a Trie

Insert/search/startsWith plus a live autocomplete over a loaded dictionary file.

unordered_map children

4.3 — Priority Queue Task Scheduler

Binary-heap priority queue for prioritized tasks — push/pop/peek.

heapifytemplates

Neetcode

Trees

Heap / Priority Queue

Trie

Phase 5 — Graph Algorithms

Syllabus Ch 20–24

Weeks 15–18

Reading

Algorithms syllabus

  • Ch 20 — Graph Representations
  • Ch 21 — BFS & DFS
  • Ch 22 — Greedy: Prim's, Kruskal's, Dijkstra's
  • Ch 23 — DP: Floyd–Warshall, Optimal BSTs
  • Ch 24 — Iterative Improvement: Max-Flow, Matching

Discrete Math

  • Ch 13 — Directed Graphs
  • Ch 14 — Digraphs & Relations
  • Ch 16 — Undirected Graphs
  • Ch 17 — Connectivity
  • Ch 26–27 — Probability

C++

  • Ch 15 — Concurrency (optional)
  • Ch 13 — std::optional

Micro-projects

5.1 — Graph Builder and Traversal

Adjacency-list graph with BFS distances, DFS discovery/finish times, and cycle detection.

std::queuestd::stack

5.2 — Shortest Path in a Maze

BFS shortest path through a grid maze loaded from file, printed with directional arrows.

vector<vector<char>>

5.3 — Kevin Bacon Game

Actor/movie graph with BFS to compute Bacon numbers, interactive CLI lookup.

unordered_map<string,vector<string>>

Neetcode

Graphs (BFS/DFS)

Shortest Path

Union Find / MST

Graph Advanced

Phase 6 — Strings, External Memory & Advanced Structures

Syllabus Ch 25–28

Weeks 19–21

Reading

Algorithms syllabus

  • Ch 25 — Tries & Integer Structures
  • Ch 26 — B-Trees & External-Memory Search
  • Ch 27 — Horspool, Boyer–Moore
  • Ch 28 — Closest-Pair & Convex-Hull

Discrete Math

  • Ch 7 — Countable & Uncountable Sets
  • Ch 19 — Finite Automata
  • Ch 20 — Regular Languages

C++

  • Ch 9 — Strings & Regex
  • Ch 10 — Input/Output

Micro-projects

6.1 — Large Dictionary Autocomplete

Trie extended with file I/O, frequency-ranked autocomplete, and deletion support.

ifstream

6.2 — Boyer–Moore String Search

Boyer-Moore and Horspool implemented and benchmarked against std::string::find on real text.

std::chrono

6.3 — Closest-Pair Visualizer

Brute-force vs divide-and-conquer closest-pair on random points, runtimes compared.

std::sort

Neetcode

String Matching

Sliding Window

Trie (revisited)

Phase 7 — Limits of Algorithmic Power

Syllabus Ch 29–33

Weeks 22–25

Reading

Algorithms syllabus

  • Ch 29 — Lower-Bound Arguments & Decision Trees
  • Ch 30 — P, NP, NP-Completeness
  • Ch 31 — Backtracking & Branch-and-Bound
  • Ch 32 — Approximation Algorithms
  • Ch 33 — Numerical Algorithms

Discrete Math

  • Ch 9 — Propositional Logic
  • Ch 10 — Normal Forms
  • Ch 11 — Logic & Computers
  • Ch 30 — Modular Arithmetic
  • Ch 31 — Public Key Cryptography

C++

  • Ch 14 — Numerics
  • Ch 16 — History & Compatibility

Micro-projects

7.1 — N-Queens Solver

Recursive backtracking N-Queens, all solutions, optimized with bitmasking.

bitwise ops

7.2 — Knapsack: Greedy vs DP vs Branch-and-Bound

0/1 Knapsack solved three ways, comparing correctness and runtime.

2D DP table

7.3 — RSA Key Generator

Generates primes, computes n and φ(n), finds e/d, encrypts and decrypts a message.

modular exponentiation

7.4 — TSP Approximation

Nearest-neighbor heuristic for TSP compared against brute-force optimal on small n.

std::set

Neetcode

Backtracking

DP — 1D

DP — 2D

DP — Advanced

Phase 8 — Appendices & Integration

Syllabus Appendices A–C

Weeks 26–27

Reading

Algorithms syllabus

  • Appendix A — Useful Formulas for Analysis
  • Appendix B — Recurrence Relations
  • Appendix C — SEList / Space-Efficiency Notes

Discrete Math / C++

  • Ch 24 & 25 revisited (Series, Recurrences)
  • C++ Ch 11 & 5 revisited (list, memory efficiency)

Micro-project

8.1 — Recurrence Solver

Takes a recurrence like T(n) = 2T(n/2) + n, computes n = 1…100, verifies the closed form, plots the growth.

memoizationstd::map

Neetcode — review

Phase 9 — The Macro-Project

Everything applied, one capstone

Weeks 28–32

Choose one

A — Real-Time Route Planner

Dijkstra + A* over a loaded road network, dynamic traffic edge weights, multi-waypoint DP routing.

graphsheapsDP

B — Full-Text Search Engine

Inverted index, boolean query parser, TF-IDF ranking, Trie autocomplete, persistent on-disk index.

hash tablestriessorting

C — Network Packet Routing Simulator

Simulated router network, shortest-path packet routing, congestion handling, topology visualization.

max-flowDijkstra

D — Cryptography Toolkit

RSA keygen and encryption, Diffie–Hellman exchange, simple SHA-256, digital signatures, file encryption.

modular arithmetic

Neetcode

1–2 problems/day alongside the capstone — hit the Hards you skipped, revisit early Mediums, simulate 30-minute interview conditions.

Then what — a compiler, a distributed KV store, microservices?

The roadmap builds the substrate. Each of these is a separate discipline sitting on top of it — here's honestly what transfers and what doesn't.

Compiler

strong overlap

Transfers directly

  • Recursion & tree traversal → reused almost verbatim for ASTs
  • Hash tables → symbol tables
  • Graphs → control-flow analysis, dependency graphs
  • Finite automata / regular languages (Phase 6) is lexer theory, already covered

Still missing

  • Parsing theory — recursive descent, LL/LR grammars
  • Lexer/tokenizer construction
  • Type systems and type checking
  • IR design, register allocation, optimization passes
Next step: Crafting Interpreters, or the Dragon Book if you want the deep end. You'll walk in with better recursion and tree instincts than most people starting cold.

Distributed KV store

new discipline

Transfers directly

  • Hash tables → the core lookup structure, now sharded
  • B-trees (Phase 6) → your storage engine
  • File I/O reps → write-ahead logging groundwork

Still missing — basically a new field

  • Networking / RPC
  • Consensus — Raft, Paxos
  • Replication and partitioning
  • Consistency models — CAP, linearizability vs eventual
  • Failure detection, log-structured storage design
Next step: Designing Data-Intensive Applications, plus a from-scratch Raft implementation. Your C++/data-structure fluency speeds up the build — it doesn't explain why Raft works.

Full-stack, microservices

biggest gap

Transfers directly

  • Almost nothing, honestly — this roadmap is single-process and in-memory throughout

Still missing

  • HTTP/REST or gRPC, a web framework
  • Frontend, however minimal
  • Containerization, service discovery, message queues
  • Real databases — schemas, migrations
  • Auth, observability, logging
Next step: being excellent at algorithms doesn't teach you how services talk to each other or how a deployable system is structured. Treat this as its own 8–12 week track.

01

This roadmap

Algorithms, C++, discrete math fundamentals

02

Compiler

Hardest reward on your algo fundamentals

03

Distributed KV store

Data structures + one new discipline: distributed systems

04

Full-stack / microservices

Least connected — run it as its own track