AVL tree in data structure, each node has a balance factor. This balance factor is the difference height between the left and right subtrees. The balance factor can only be -1, 0, or 1. If the balance factor gets outside this range, the tree does a rotation to fix itself.
This keeps the tree short and wide, making it faster to search, insert, and delete items.