AlgoScope

Balance Factor

Left height minus right height. Every node must stay within -1, 0 or 1.

Tree algorithms, analysis, intermediate
Node 20 has balance 1. It is fine.1020current
Node 20 has balance 1. It is fine.1020current

AVL Tree: Already balanced, no rotations

Decision, step 6 of 26

At 20: left height 1, right height 0, balance 1. Within one, so it stays.

How avl tree works

Cost

Space
O(1)

Before this

Leads to

Topics that need this one first.

Taught by the same lesson

AVL Tree covers these too, in the same run.