Splay Tree

Domain: Data Structures

🎯 Motivation

A self-balancing tree that moves recently accessed nodes to the root, exploiting the fact that accesses are often repetitive (temporal locality).

πŸ“‹ Concrete Example

After searching for node X, the tree rotates X to the root. If you search for X again soon, it is right at the top β€” instant access.

πŸ”— Analogy

A bookshelf where the book you just read goes to the front. If you tend to re-read recent books, they are always within arm’s reach.