Stanford CS 106B: Programming Abstractions
CS 106B follows 106A with programming abstractions in C++ — recursion, ADTs and the standard collections, big-O, linked structures, trees, and hashing. It's the course where Stanford CS gets real, and like 106A its materials are public and heavily used by self-learners.
Fennie is independent and not affiliated with Stanford University. This is an unofficial study guide.
Build my CS 106B study planWhat makes it hard
Two simultaneous jumps: a stricter language (C++ after Python) and a stricter way of thinking (recursion and pointer-based structures). Recursive backtracking is the famous wall — students who pattern-matched through 106A meet problems that can't be solved without an actual mental model of the call stack. Assignments are long, and the quarter does not pause for the recursion unit.
What you'll cover
- • C++ fundamentals after Python
- • Abstract data types and collections
- • Recursion and recursive backtracking
- • Big-O and algorithmic analysis
- • Pointers and linked structures
- • Trees, heaps, and hashing
The CS 106B study guide
How to study for Stanford CS 106B, step by step.
- 1
Close the C++ gap in the first two weeks
The early weeks are your only slack for language friction. Drill C++ syntax, references, and the collection classes until the language stops costing you attention you need for the concepts.
- 2
Give recursion the inductive mental model
Trust the recursive call to handle the smaller case while you reason about one frame. Students who try to trace every call of every backtracking example burn out; the inductive leap is the course's real checkpoint.
- 3
Start assignments the day they're released
106B assignments are long and debugging recursive or pointer code takes calendar days. The gap between day-one starters and deadline coders is most of the grade distribution.
- 4
Draw every linked-structure operation
For each insert, delete, and traversal, diagram what every pointer references before and after. Exams test these operations on paper, where the debugger can't save you.
- 5
Trace code by hand weekly
Predicting output for recursive and pointer-based code you didn't write is half of every exam. It's a trainable mechanical skill — train it before exam week.
- 6
Space the hard units with Fennie
Upload your CS 106B syllabus and Fennie's Daily Plan spreads recursion and pointer practice across weeks, paces assignments from release day, and generates practice quizzes from the actual course content. Free to start.
Start my CS 106B plan free
How Fennie helps with CS 106B
Fennie's Daily Plans give CS 106B's two walls — recursion and linked structures — the spaced, repeated practice they need inside a ten-week quarter, with assignments paced from release day. Chat traces recursive calls and pointer diagrams step by step until you can run the code in your head, which is exactly the exam skill.
FAQ
Is CS 106B harder than CS 106A?
Yes, and by design: C++ replaces Python, recursion replaces straightforward control flow, and the assignments roughly double in depth. Students call the recursive backtracking unit the moment the course separates pattern-matchers from problem-solvers.
Can I self-study CS 106B online?
The lectures, assignments, and section handouts are publicly available and widely used by self-learners after 106A or an equivalent. The content transfers fully — what self-learners lack is the deadline structure, which is worth recreating deliberately.
How much time does CS 106B take per week?
Budget 15-20 hours in assignment-heavy weeks. The five units are honest: lectures, section, readings, and assignments that grow through the quarter, with recursion and linked-structure assignments reliably taking longer than students expect.
Pass CS 106B with a plan, not a cram
Upload your CS 106B materials and Fennie generates a Daily Plan paced to your deadline — plus chat, flashcards, and quizzes built from the actual course content.
Get started freeMore Stanford courses
CS 106A — Programming Methodology
CS 106A is Stanford's famous introduction to programming, taught in Python — control flow, functions, decomposition, lists, dictionaries, and graphics — assuming zero prior experience. Its lectures and assignments are public, and through Code in Place it has been taught free to hundreds of thousands of people, so it's studied worldwide by enrolled students and self-learners alike.
CS 107 — Computer Organization and Systems
CS 107 takes students from C++ down to the machine: C programming, pointers and memory, bit-level representation, x86-64 assembly, and how the heap actually works — culminating in the famous heap allocator assignment. It's the systems gateway of the Stanford CS core.
CS 103 — Mathematical Foundations of Computing
CS 103 is Stanford's discrete math and theory gateway — proof techniques, set theory, induction, graph basics, then finite automata, regular languages, and the first look at computability and P vs NP. For most students it's the first course where the deliverable is a proof, not a program.
CS 109 — Probability for Computer Scientists
CS 109 is probability built for CS — counting, conditional probability, random variables and distributions, the central limit theorem, then maximum likelihood and the first real machine learning algorithms. It bridges the core sequence to CS 221 and CS 229 and is many students' favorite course in the major.