The Archive

The Archive

A field guide to data structures and algorithms, told as stories.

Welcome to The Archive — a structured walk through every data structure and algorithm that actually matters, arranged from the easy ones to the gnarly ones.

This isn't a list of interview answers. There are no puzzle questions here. Instead, every topic is told the way it was actually lived: what problem forced someone to invent it, what they tried first, where it broke, and the moment it clicked into place.

How to read it

Each page follows the same five-beat rhythm:

  1. The 10-second version — the whole idea in a paragraph.
  2. Why this existed — the real problem, the people, and the history.
  3. Inside the inventor's head — the failed attempts and the pivot, as a story.
  4. The final approach — the complete, working algorithm, with diagrams and code.
  5. Where you meet it today — the modern places it quietly powers.

You'll see code in C, JavaScript, and Rust. Flip the switch in the header (or the small control under any snippet) and every example on the page follows you. Prefer to skim? Every page also has a Recap at the bottom with the three things worth remembering.

Want the conventions and the full explanation of the format? Read How to read The Archive.

The path

Topics are ordered so that everything a page needs, an earlier page already covered. You can read straight through, or jump to a track.

Rendering diagram…

Start here

On this page