Splay Tree
A Splay Tree is a self-adjusting binary search tree. Whenever a node is accessed, the tree performs rotations to move that node toward the root. It does not maintain a strict balance invariant, so an individual operation can take O(n), but the amortized cost of search, insertion, and deletion is O(log n). It is useful when access patterns exhibit locality, meaning recently accessed items are likely to be accessed again.
No explicit balance metadata is required.
Amortized operation complexity: O(log n).
Worst-case individual operation: O(n).
Frequently accessed elements tend to move near the root.
Useful when temporal or spatial locality is important.
0-2 years experience
2-5 years experience
5-8 years experience
8+ years experience