Question: I need help writing this function in c++ Balance Tree node: Pointer Reference to node Arguments Return TypeNone and if so what rotation should occur.

 I need help writing this function in c++ Balance Tree node:

I need help writing this function in c++

Balance Tree node: Pointer Reference to node Arguments Return TypeNone and if so what rotation should occur. Balance Factor is called in Insert and Delete methods Pseudocode Get the balance Factor of the Node If the node doesn't need balancing: 1. 2. 3. Else a. If the tree is left heavy: i. If temps left child has a left child 1. Perform a right single rotation ii. Else Perform a Left Right rotation 1. If the tree is right heavy: b. i. If temps right child has a right child 1. Perform a left single rotation ii. Else 1. Perform a Right Left rotation

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!