Skip to main content
Stanford
Computer Science
5 credits

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 plan

What 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. 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. 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. 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. 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. 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. 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 free

More Stanford courses