Question: For a BST T and a node N in T, let B(N) height of left sub tree of N-height of right subtree of N. Note

 For a BST T and a node N in T, let

For a BST T and a node N in T, let B(N) height of left sub tree of N-height of right subtree of N. Note that B(N) could be positive, negative or 0. Let T be the following BST: The root node is X, it has a left subtree named R and a right subtree rooted at Y. The node Y has a right subtree Z and a left subtree rooted at node U. The node U San the tree obtained by balancing T. Draw the intermediate trees (if any) obtained while balancing. Once you balance the tree, what are B(X), B(Y) and B(U)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!