Methods of balancing a tree data structure, including AVL trees, red-black trees, and tree rotations.