Essential Data Structures

The twenty structures that most programs are built from, explained plainly: what each one is, how it works, and when to reach for it.

Array Stack Hash Table
Illustration: an array in a row, a stack in a pile, and a hash table in buckets.

Each entry on this site starts with what the structure is, in plain language. Then it looks at how it works, what each operation costs, when to use it and when not to, and where you meet it in real programs. A short Python example and a diagram sit on every page. Sources are listed at the end of each page, so a reader can check the facts.

Browse all structures

Coming next

Union-Find in Graphs. LRU Cache, Skip List, Segment Tree, and Fenwick Tree in Specialized.