# Self-Balancing Binary Search Tree

Binary Search Trees can become unbalanced, which is why different techniques exist to balance them automatically.

Ideally, we want to them to be balanced, i.e. the height of the tree is $O(gn)$

### Types of Balanced Search Trees

- AVL Trees Adelâ€™son-Velsii and Landis 1962
- B-Trees/2-3-4 Trees Bayer and McCreight 1972 (see CLRS 18)
- BB[Î±] Trees Nievergelt and Reingold 1973
- Red-black Trees CLRS Chapter 13
- (A) â€” Splay Trees Sleator and Tarjan 1985 (current research topic, see 6.854 (Advanced Algorithms) and 6.851 (Advanced Data Structures))
- (R) â€” Skip Lists Pugh 1989
- (A) â€” Scapegoat Trees Galperin and Rivest 1993
- (R) â€” Treaps Seidel and Aragon 1996

(R) = use random numbers to make decisions fast with high probability (A) = â€śamortizedâ€ť: adding up costs for several operations $â†’$ fast on average