Why it matters

Splay trees are elegant amortized. Understanding shapes advanced BST.

Advertisement

The architecture

Access: rotate node to root via zig/zag/zig-zig operations.

Frequent accesses become fast.

Splay tree opsAccess → splayto rootZig/zag rotationsrestructureAmortized O(log n)even without balanceGreat locality for skewed access; foundation of LCT
Splay tree operations.
Advertisement

How it works end to end

No balance field: simpler than RB tree.

Working set theorem: recently accessed nodes are cheap to reach.

Applications: caches, LCT, offline algorithms.