Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with problems 5 and 6. Please explain to me how you get to the answe

ID: 3834032 • Letter: I

Question

I need help with problems 5 and 6. Please explain to me how you get to the answer. Thank You.

5) The figure below is part of a B tree: 10 15 30 The left subtree of key value 15 has 5 key values and the right subtree has 3 Restructure the tree to have 4 values in both subtrees. Draw the resulting tree including lines to indicate connections to lower level subtrees A through L (6 points) Page 4 of 13 6) Starting with the same tree as the previous problem, bring the 15 down and merge its left and right subtrees.Draw the resulting tree including lines to indicate connections to lower level subtrees A through L (6 points)

Explanation / Answer

A binary tree T is balanced if:
1) Left subtree of T is balanced
2) Right subtree of T is balanced
3) The difference between heights of left subtree and right subtree is not more than 1.

After inserting a node as a child of g, find the balance factors of each node.

Balance Factor of node a = height of left subtree - height of right subtree = 2

Similarly the balance factors of the nodes are b = 2, c = 2, d = 0, g = 1, e = 1 and f = 0.

Nodes having balance factor 1, 0 and -1 are balanced nodes. All other nodes are unbalanced nodes.

Note: Whenever a node gets unbalanced, all the nodes on the path from first unbalanced node to till the root also gets

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote