Find the max in the min subtree (or vice versa) and splay it.
Add the other subtree as the absent root child.
Splay-Deletion Example
Delete Q from the tree.
Summary
Ordinary binary-search tree performance is data dependent.
Self balancing trees guarantee performance.
At an implementation-complexity cost.
Sometimes “almost” is good enough.
Particularly if it’s much less expensive.
The caching heuristic is valuable; recognize and exploit it.
References
Binary Search Trees (Section 12.4), Tree Balancing: AVL Trees (Section
15.2) and 2-3-4 Trees, Red-Black Trees, B-Trees, and other Trees (Section
15.3) in ADTs, Data Structures, and Problem Solving with C++ second
edition by Larry Nyhoff, Prentice Hall, 2005.