Data structures & algorithms

Once by the book.
Once where it earns its place.

The fundamentals in their textbook form and inside a real system. Explore how a structure works, what your language already ships, and the situations where one choice earns its place over another.

Starting with TypeScript, Go, and Python Go is the default comparison. Python is also available.

An algorithm a day keeps the rejection emails away.
Knowing when to use it is what keeps the pager quiet.

— random opinionated engineer

Follow these building blocks into text matching, pathfinding, image processing, and more in Applied algorithms →

Arrive with a situation

Nobody goes looking for a heap. They need “whatever is most urgent, next” and discover the name afterward. Start with what you keep needing, then explore the usual answer and the alternatives worth weighing.

30 articles

Ready articles Showing lessons that are ready to explore. Choose Drafting articles for works in progress, or All topics for the full catalog.

Foundations and cost

Name the input, count the work, and keep memory honest.

Sequences and ordered work

One after another, and what it costs to reach the middle.

Lookup, membership, and eviction

Find a value, remember what you have seen, and decide what to keep.

Trees, priority, and prefixes

Keep enough order to answer a useful question quickly.

Graphs and connectivity

Things that point to one another, and the ways to follow those connections.

Approximate structures

Smaller memory footprints, with the uncertainty made explicit.

Search, sorting, and sequence techniques

Ways to work over a sequence, and what makes each approach useful.