Crucial Operation called “Splay”
to “splay” something means to spread it out and flatten it
Splay (K, T), where K is a key and T is a BST modifies T so that
- it remains BST with same set of items
- new tree has K at root if K was already in T
- if K was not in T, root contains key that would be predecessor (or successor) of K if K were in tree.
Call this operation “splaying the tree around K”