Question 5: AVL Trees [10]
Redraw the following tree after a right rotation through node 50: 50 / \ 10 60 / \ 5 20 | Redraw the following tree after a left rotation through node 50: 20 \ 50 / \ 30 60 / 55 |
What two rotations would be used to balance the following tree? Sketch what the tree would look like after the rotations. B / \ A E / \ D F / C | What rotation(s) would be used to balance the following tree? Sketch what the tree would look like after the rotation(s). B / \ A D / \ C F / E |