The Interactive Handbook

The Ledger

ContentsData Structures & SystemsEst. 2026

A field guide to the structures behind databases, distributed systems, geometry, graphics, search, runtimes, and machine learning systems. Read the finished chapters now; the rest mark the path of the handbook.

Foundations

The small structures that show up everywhere else.

Sets, Queues, And Membership

Ordered Search Structures

Skip List

Ordered search with coin-flip express lanes.

Read chapter

Treap

A randomized binary search tree with heap priorities.

Coming soon

Splay Tree

A tree that moves hot keys close to the root.

Coming soon

Van Emde Boas Tree

Integer-key operations in tiny logarithmic time.

Coming soon

Red-Black Tree

Balanced search with strict coloring invariants.

Coming soon

AVL Tree

Height-balanced search with aggressive rotations.

Coming soon

Scapegoat Tree

Rebuild unbalanced subtrees instead of storing balance metadata.

Coming soon

Heaps And Merge Structures

Binary Heap

The compact array-backed priority queue.

Coming soon

Binomial Heap

A forest of power-of-two heaps built for merging.

Coming soon

Fibonacci Heap

Lazy merging with excellent amortized graph operations.

Coming soon

Pairing Heap

A practical meldable heap with simple pointer structure.

Coming soon

Tournament Tree

Keep winners visible while merging many sorted streams.

Coming soon

Text And Functional Structures

Trie

Prefix search, autocomplete, routing tables, and dictionaries.

Coming soon

Rope

A text buffer structure for large editable documents.

Coming soon

Zipper

Navigate and edit immutable trees with local focus.

Coming soon

Persistent Data Structures

Keep old versions without copying the whole world.

Coming soon

Finger Tree

A functional sequence structure for fast access near fingers.

Coming soon

HAMT

Hash-array mapped tries for persistent maps and sets.

Coming soon

Databases

Indexes, logs, filters, and storage layouts behind real engines.

Write-Heavy Storage

LSM Tree

Append now, sort in memory, merge the debt later.

Read chapter

Write-Ahead Log

Durability before mutation: the recovery backbone.

Coming soon

Bitcask / Hash Index

Append-only files with an in-memory key directory.

Coming soon

Advanced Write-Heavy Indexes

Cuckoo Filter

A deletable membership filter for storage engines.

Coming soon

Bloom Filter Cascade

Layered filters for multi-level LSM lookups.

Coming soon

Masstree

A cache-conscious trie of B+ trees for modern hardware.

Coming soon

Log-Structured Merge Forest

Many LSMs working together instead of one tree.

Coming soon

Fractal Tree Index

Buffer updates inside a tree to reduce random writes.

Coming soon

Bw-Tree

A latch-free B-tree variant built from delta records.

Coming soon

Read-Heavy Storage

B+ Tree

The classic page-oriented index for range scans.

Coming soon

B-tree vs LSM Tree

Why reads, writes, and compaction trade places.

Coming soon

Roaring Bitmap

Compressed posting lists and fast set operations.

Coming soon

Segment Tree

Range queries with logarithmic updates.

Coming soon

Fenwick Tree

Compact prefix sums for mutable numeric data.

Coming soon

Zone Map

Skip blocks by storing min/max summaries per chunk.

Coming soon

Sparse Index

Index representative keys instead of every row.

Coming soon

Columnar And Analytical Layouts

Column Store

Store each field separately for scans and compression.

Coming soon

Dictionary Encoding

Replace repeated values with compact integer ids.

Coming soon

Run-Length Encoding

Compress repeated values as value and count pairs.

Coming soon

Bitmap Index

Use bitsets to answer analytical filters quickly.

Coming soon

Caches And Memory Indexes

LRU Cache

Evict the least recently touched item.

Coming soon

LFU Cache

Evict by access frequency instead of recency.

Coming soon

ARC Cache

Balance recent and frequent access patterns adaptively.

Coming soon

Clock Cache

Approximate LRU with a circular reference-bit scan.

Coming soon

Slab Allocator

Group fixed-size allocations for predictable memory reuse.

Coming soon

Search And Vector Indexes

TF-IDF / BM25

The scoring model behind practical keyword search.

Coming soon

Suffix Array / Suffix Tree

Substring search without scanning every character.

Coming soon

Aho-Corasick Automaton

Match many patterns in one pass.

Coming soon

HNSW Graph

Approximate nearest-neighbor search at scale.

Coming soon

Locality-Sensitive Hashing

Put similar vectors into the same buckets.

Coming soon

IVF Index

Partition vector space into coarse clusters before search.

Coming soon

Product Quantization

Compress vectors into codebooks for fast approximate search.

Coming soon

Distributed Systems

Data representations for partitioning, causality, replication state, and distributed logs.

Partitioning And Placement

Hash Ring

Represent key ownership around a circular token space.

Coming soon

Partition Map

Map key ranges or shards to replica owners.

Coming soon

Virtual Nodes

Smooth load across uneven machines in a hash ring.

Coming soon

Shard Map

Route keys through an explicit partition ownership table.

Coming soon

Replica State

Merkle Tree

Compare replica state by hashing whole subtrees.

Coming soon

Replica Set

Represent the nodes responsible for each shard copy.

Coming soon

Replication Log

Store ordered state changes for followers to replay.

Coming soon

Time, Causality, And Ordering

Vector Clock

Track causal order without one global clock.

Coming soon

Lamport Clock

Create a partial ordering of events with counters.

Coming soon

Hybrid Logical Clock

Blend physical time with causal ordering.

Coming soon

Version Vector

Track per-replica versions for conflict detection.

Coming soon

Conflict-Free Collaboration

CRDT

A family of mergeable replicated data structures.

Coming soon

Causal Tree

Represent collaborative text as ordered causally linked inserts.

Coming soon

Last-Writer-Wins Register

A simple conflict rule with sharp tradeoffs.

Coming soon

Observed-Remove Set

A CRDT set that makes adds and removes mergeable.

Coming soon

Queues, Logs, And Streams

Partitioned Commit Log

Scale ordered event storage across independent partitions.

Coming soon

Consumer Offset Index

Track per-reader progress through an append-only log.

Coming soon

Delay Queue

Release work only after its scheduled time arrives.

Coming soon

Dead Letter Queue

Preserve failed messages for diagnosis and replay.

Coming soon

Spatial And Geometry

Indexes and representations for points, polygons, maps, and collision worlds.

Point And Region Indexes

KD-tree

Split space by alternating coordinate axes.

Coming soon

Quadtree / R-tree

Partition or bound space for map and region queries.

Coming soon

Interval Tree

Find overlapping ranges efficiently.

Coming soon

Geohash

Encode nearby coordinates with shared prefixes.

Coming soon

S2 Cell

Index the globe with hierarchical cells on a projected cube.

Coming soon

H3 Hex Index

Represent Earth with hierarchical hexagonal cells.

Coming soon

Collision And Acceleration Structures

Bounding Volume Hierarchy

Nested boxes for fast intersection tests.

Coming soon

BSP Tree

Recursively split space with planes for visibility and collision.

Coming soon

AABB Tree

Maintain axis-aligned boxes for dynamic collision worlds.

Coming soon

Spatial Hash Grid

Bucket nearby objects by grid cell for broad-phase queries.

Coming soon

Planar Geometry Structures

Voronoi Diagram

Divide space by nearest site.

Coming soon

Delaunay Triangulation

Connect points into well-shaped triangles.

Coming soon

Arrangement

Store vertices, edges, and faces induced by curves or segments.

Coming soon

Quad-Edge

Represent primal and dual planar subdivisions together.

Coming soon

Mesh And Polygon Representation

Half-Edge Data Structure

Store mesh adjacency for traversal and editing.

Coming soon

DCEL

A planar subdivision structure for faces, edges, and vertices.

Coming soon

Winged-Edge Mesh

Store rich edge adjacency for manifold surfaces.

Coming soon

Face-Vertex Mesh

Store geometry as vertex arrays plus indexed faces.

Coming soon

Graphics Programming

The rendering pipeline from pixels to scenes.

Rasterization Pipeline

Z-buffer

Depth testing so nearer fragments win.

Coming soon

Barycentric Coordinates

Interpolate values across triangles.

Coming soon

Anti-Aliasing

MSAA, FXAA, and TAA for smoother edges.

Coming soon

G-buffer

Store per-pixel material and geometry data for deferred rendering.

Coming soon

GPU Programs And Surfaces

Shader

Vertex and fragment programs in the GPU pipeline.

Coming soon

Texture Mapping / UVs

Wrap images onto mesh surfaces.

Coming soon

Normal Mapping

Fake surface detail by perturbing normals.

Coming soon

Signed Distance Field

Represent shapes by distance to the nearest surface.

Coming soon

Scene Organization And Visibility

Scene Graph

Represent transforms and hierarchy in a world.

Coming soon

Level-of-Detail Hierarchy

Store alternate mesh resolutions for distance-based rendering.

Coming soon

Portal Graph

Represent visible room-to-room connections in indoor scenes.

Coming soon

Lighting And Render Architecture

Ambient Occlusion

Darken creases where nearby geometry blocks light.

Coming soon

Deferred vs Forward Rendering

Choose where lighting work happens.

Coming soon

Global Illumination

Model indirect light bouncing through a scene.

Coming soon

Lightmap

Store baked lighting in texture space.

Coming soon

Curves, Volumes, And Transforms

Bezier Curves / B-splines

Smooth curves for paths, fonts, and animation.

Coming soon

Quaternion

Represent 3D rotation without Euler angle traps.

Coming soon

Skeletal Animation

Drive meshes with bone hierarchies and skin weights.

Coming soon

Dual Quaternion Skinning

Blend rigid transforms with fewer collapsing artifacts.

Coming soon

Sketches And Approximation

Tiny summaries for huge streams and uncertain answers.

Probabilistic Summaries

HyperLogLog

Estimate distinct counts in a tiny amount of memory.

Coming soon

Count-Min Sketch

Approximate frequencies in streaming data.

Coming soon

Cuckoo Filter vs Bloom Filter

Membership tests when deletion matters.

Coming soon

Quotient Filter

A compact deletable approximate membership structure.

Coming soon

Xor Filter

Fast static membership filters with low memory overhead.

Coming soon

T-Digest

Approximate quantiles accurately at distribution tails.

Coming soon

KLL Sketch

A compact quantile sketch with strong error bounds.

Coming soon

Time-Series Structures

Time-Series Chunk

Store ordered samples in compressed time-window blocks.

Coming soon

Delta-of-Delta Series Block

Store timestamps as changes in spacing inside compressed blocks.

Coming soon

Gorilla Block

A time-series block layout for timestamp and float compression.

Coming soon

Downsampling Rollup

Precompute coarser windows for long-range queries.

Coming soon

Retention Tier Index

Organize hot, warm, and cold series by age.

Coming soon

Time-Partitioned B+ Tree

Route recent and historical samples through time ranges.

Coming soon

TSM File

Influx-style immutable time-series blocks and indexes.

Coming soon

LSM Time-Series Layout

Use sorted runs optimized for append-heavy metrics.

Coming soon

Stream Windows And Heavy Hitters

Sliding Window Counter

Track recent activity without storing every event.

Coming soon

Exponential Histogram

Approximate counts over a moving time window.

Coming soon

Heavy-Hitter Summary

Track dominant keys in high-volume streams with bounded memory.

Coming soon

Reservoir Sample

Store a representative sample from an unknown stream.

Coming soon

Misra-Gries Summary

Track frequent items with bounded counters.

Coming soon

Lossy Counting Summary

Store approximate frequent items over stream buckets.

Coming soon

Graph Structures

Representations for relationships, dependencies, control flow, and graph-shaped data.

Graph Representations

Adjacency List

Store sparse graph neighbors compactly.

Coming soon

Adjacency Matrix

Constant-time edge checks for dense graphs.

Coming soon

Compressed Sparse Row

Pack graph edges into arrays for fast traversal.

Coming soon

Edge List

Represent graphs as sortable relationship records.

Coming soon

Property Graph

Attach labels and attributes to nodes and edges.

Coming soon

Graph Families And Components

Directed Graph

Store relationships where edges have orientation.

Coming soon

Undirected Graph

Store symmetric relationships between vertices.

Coming soon

Directed Acyclic Graph

Represent dependencies with no directed cycles.

Coming soon

Multigraph

Allow multiple edges between the same pair of vertices.

Coming soon

Hypergraph

Represent edges that can connect more than two vertices.

Coming soon

Specialized Graph Structures

Dominator Tree

Represent dominance relationships in a control-flow graph.

Coming soon

SPQR Tree

Decompose a graph by its triconnected components.

Coming soon

Link-Cut Tree

Maintain a changing forest with path queries.

Coming soon

Graph-Structured Stack

Share parser stack prefixes across ambiguous parses.

Coming soon

Flow And Constraint Graphs

Residual Graph

Track remaining capacity and reverse corrections in flow.

Coming soon

Bipartite Matching Graph

Pair two sets under compatibility constraints.

Coming soon

Factor Graph

Represent variables and constraints as a bipartite graph.

Coming soon

Decision Diagram

Compactly represent boolean functions as a directed graph.

Coming soon

Compilers And Runtimes

Structures that turn source code into execution.

Parsing And Syntax

Token Stream

The linear structure produced by lexical analysis.

Coming soon

Parse Tree

Represent grammar derivations before semantic cleanup.

Coming soon

Abstract Syntax Tree

The program shape compilers actually transform.

Coming soon

Pratt Parser Table

Encode expression precedence with binding powers.

Coming soon

Concrete Syntax Tree

Preserve source-level syntax details for tooling.

Coming soon

Intermediate Representation

Control-Flow Graph

Represent basic blocks and jumps between them.

Coming soon

Static Single Assignment

Give every value one definition for easier optimization.

Coming soon

Use-Def Chain

Link variable definitions to the places that use them.

Coming soon

Symbol Table

Map names to scopes, types, and declarations.

Coming soon

Type Environment

Track inferred and declared types across scopes.

Coming soon

Runtime Memory

Call Stack

Store frames, locals, returns, and control flow.

Coming soon

Heap Arena

Allocate many objects from large memory regions.

Coming soon

Free List

Track reusable memory blocks after deallocation.

Coming soon

Heap Object Graph

Represent object references for tracing and garbage collection.

Coming soon

Generational Heap

Separate young and old objects for faster collection.

Coming soon

Networking And Security

Packet paths, identity, integrity, and authenticated storage.

Network Lookup And Routing

Radix Tree

Compress prefixes for routing tables and string maps.

Coming soon

Patricia Trie

Bitwise compressed trie for IP prefix lookup.

Coming soon

Routing Table

Choose next hops by destination prefix.

Coming soon

Connection Table

Track active flows by five-tuple keys.

Coming soon

Token Bucket

Rate-limit bursts with refillable capacity.

Coming soon

Cryptographic Structures

Merkle Tree

Authenticate large sets through recursive hashes.

Coming soon

Merkle Patricia Trie

Authenticated key-value storage for blockchain state.

Coming soon

Sparse Merkle Tree

Prove membership in a huge mostly-empty key space.

Coming soon

Hash Chain

Link records so tampering changes every later hash.

Coming soon

Accumulator

Compactly prove set membership with cryptographic witnesses.

Coming soon

Machine Learning And IR

Structures for retrieval, ranking, tensors, and learned representations.

Retrieval Indexes

Inverted Index

Map terms to documents and positions.

Coming soon

Posting List

Store document ids, positions, and term payloads.

Coming soon

Skip Pointer

Jump across long posting lists during intersection.

Coming soon

FST Term Dictionary

Compress sorted terms into a finite-state transducer.

Coming soon

WAND Index

Skip low-scoring documents during top-k retrieval.

Coming soon

Vector And Tensor Layouts

Embedding Matrix

Store learned vector rows for tokens or entities.

Coming soon

Tensor Strides

Map multidimensional indexes onto flat memory.

Coming soon

Sparse Tensor

Store only non-zero coordinates and values.

Coming soon

Quantized Tensor

Pack approximate numeric values into smaller types.

Coming soon

KV Cache

Reuse transformer attention keys and values during generation.

Coming soon