Splay Trees
Introduction
A Splay Tree is a self-adjusting binary search tree (BST) that performs basic operations such as search, insertion, and deletion in amortized O(log n) time. The tree self-adjusts by moving the most recently accessed element to the root through a process called splaying. This ensures that frequently accessed elements are quick to reach in future operations.
Splay trees are particularly effective when access patterns exhibit locality of reference, meaning that recently accessed elements are likely to be accessed again soon.
Video Explanation
