Balances an AVL tree by performing rotations (single or double) when subtree heights differ by more than one.
Explain code with DocComment! Try out your own code!