AVLTtrees aWhat is the property of an AVL tree What is the w
AVLTtrees:
a.What is the property of an AVL tree? What is the worst case time complexity (Big-Oh) of the insert operation into an AVL tree, where n is the number of nodes in the tree?
b.Please show the AVL tree that results after inserting the int values in the order 19, 37, 60, 25, 12, 33, and 46, into an empty AVL tree. Please clearly show the tree that results after each insertion, and make clear any rotations that must be performed.
c.Please show the AVL tree that results after deleting 12, from the AVL tree obtained from b. Please clearly show the tree that results after deletion, and make clear any rotations that must be performed.
Solution
a).two PROPERTIES OF AVL TREE are
1)heights of the two child subtrees of any node differ by at most one
2)It is a self blancing binary tree
worst case time complexity of an AVL tree is O(log n)
