Tree Method: Binary Search Tree (Cont’d)
20.2 10.9
10.9 29.23 5.0 20.2
5.0 15.2 2.9 6.3 15.2 29.23
2.9 6.3
rotate 20.2 around 10.9
Unbalanced tree
Balanced tree
Result of the operation rotate(10.9, 20.2).
Previous slide
Next slide
Back to first slide
View graphic version