Consider the tree given in the below figure, insert 13 and show the new…

PYQ GATE 1988

Consider the tree given in the below figure, insert 13 and show the new balance factors that would arise if the tree is not rebalanced. Finally, carry out the required rebalancing of the tree and show the new tree with the balance factors on each mode.

Starting binary search tree rooted at 17; left child 12 with children 5 and 15, 5 has left child 1, and 15 has children 14 and 16; right child 20 has children 18 and 24.

Attempted by 2 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…