algoritmauzmanı
Sign in
TREN
Subtopic 7.3

AVL Tree

6lessons41 min0done

An is a that keeps the height difference of the two subtrees at most 1 at every node. When the difference reaches 2, a small link change called a brings the balance back without breaking the order.

The subtopic first explains the , then the two single rotations and the two double rotations. The last two lessons use them in insertion and deletion: the value is placed, and on the way back up every node is updated and rotated if needed.

Lesson 7.3.1 AVL trees: height and balance factor6 min