AVLs
AVLs, also known as AVL trees, are self-balancing binary search trees. They are named after their inventors, Georg AVL and Donald Knuth. The defining characteristic of an AVL tree is that for every node, the height difference between its left and right subtrees, known as the balance factor, is at most one. This balance factor is calculated as height(left subtree) - height(right subtree). If this condition is violated at any node during an insertion or deletion operation, the tree performs rotations to restore the balance.
The primary advantage of AVL trees is their guaranteed logarithmic time complexity for search, insertion, and
Rotations are the key to maintaining the AVL property. There are four types of rotations: single left