📖 Book · stl · high

📦 std::vector, from the inside

Size vs capacity, geometric growth, a from-scratch Vec<T>, and the noexcept-move payoff.

How std::vector really works: the size/capacity distinction, why push_back is amortised O(1) via geometric growth, a complete from-scratch growable array using raw storage + placement new, and the noexcept rule that decides whether reallocation moves or copies.

5 chapters▶ runnable code✦ in-depth animation

What this book covers

  1. 01“How does std::vector grow?”
  2. 02Capacity vs size — watch it reallocate
  3. 03Build a growable array from scratch — run it
  4. 04Why move semantics decide the cost of growth
  5. 05Invalidation & the gotchas

Read it in full — runnable C++ + step-through animations

Every chapter of std::vector, from the inside ships complete, editable code you compile and run in the browser, plus the same in-depth animations as the lessons.

std::vector, from the inside — C++ Deep-Dive Book (runnable code + animation) · C++ Interview Prep