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.