Data Structures
How data is actually arranged in memory, and what each arrangement costs you, from a single pointer to a balanced tree, shown as the machine sees it.
Being built now. Each lesson shows one arrangement of data and what it costs to read, write and grow, which is the trade every algorithm later depends on.
- Lessons
- 2 of 9 ready
- Anchored to
- CLRS
- Prerequisites
- First-year programming
- Price
- Free, no account
Ready to learn
- 01
Memory, addresses and pointers
Memory as a row of numbered boxes, and what it means for one box to hold the number of another.
9 min·3 predictions·InteractiveStart → - 02
Arrays: why the index is free
One multiplication and one addition. That is the whole reason arrays are fast, and the whole reason inserting is slow.
8 min·3 predictions·InteractiveStart →
The rest of the course
In prerequisite order. Each lesson assumes only what came before it, so the sequence is the shortest honest path through the course.
- 03
Linked lists: why pointers earn their keep
Insertion in the middle, done twice: once in an array, once in a list, with the cost visible both times.
Not built yet - 04
Stacks and queues
Two containers that differ by one rule, and everything that rule changes.
Not built yet - 05
Trees and traversals
The same three traversals, shown as the same walk with the visit happening at three different moments.
Not built yet - 06
Binary search trees, and why balance matters
Rotations, which are notoriously opaque on a whiteboard and obvious the moment they move.
Not built yet - 07
Heaps and priority queues
A tree kept just ordered enough to answer one question instantly, and no more.
Not built yet - 08
Hash tables and collisions
Change the hash function and watch the buckets fill unevenly in front of you.
Not built yet - 09
Graphs: how to store one
Adjacency list or adjacency matrix: the same graph, two costs, shown side by side.
Not built yet