Balanced Binary Tree Algorithm

These structures supply efficient implementations for mutable ordered lists, and can be used for other abstract data structures such as associative arrays, priority queues and sets. In computer science, a self-balancing (or height-balanced) binary search tree is any node-based binary search tree that automatically keeps its height (maximal number of levels below the root) small in the face of arbitrary item insertions and deletions.

Balanced Binary Tree source code, pseudocode and analysis