AVL tree property

Explain when AVL tree property is violated and describe how to solve it?

E

Expert

Verified

After the insertion of any node in an AVL tree if the balance factor of any node becomes other than -1, 0, or 1 then it is stated that AVL property is violated. Therefore the node on the path from the inserted node to the root requires to be readjusted. Check out the balance factor for each node in the path from inserted node to the root node and adjust the influenced sub tree in such a way the whole sub tree must satisfy the AVL property.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.