Posted inAVL Trees Binary Search Trees Computer Science
AVL Trees: Adding Linear Data and Performing Rotations
In this AVL tree example we add linear data starting with 12 then 21 30 38 42 and 55. After each insertion we update balance factors and when we hit imbalance we select the XYZ trinode and perform rotations to restore the AVL property. The tree stays balanced despite the bad input data.
