Term
Balance factor
The height of a node's left subtree minus the height of its right subtree. In an AVL tree it must be -1, 0 or 1 at every node; at 2 or -2 a rotation is needed.
The height of a node's left subtree minus the height of its right subtree. In an AVL tree it must be -1, 0 or 1 at every node; at 2 or -2 a rotation is needed.