Draw the resulting AVL tree after each insertion for the following integer inputs added in this order: 9, 20, 2, 30, 7, 1, 4, 25, 9, 5. 11. (Use the standard binary search tree insertion algorithm and then perform the correct rotations, if required, after each insertion.) Label each different tree with the balance factor at each node.
Expert Answer
After inserting, 9,20,2,30
Inserting 7
Inserting 1 and 4
After inserting 25
After inserting 9 and 5
FInal AVL tree after inserting 11