RB Trees: Rotation
rightRotate(y)
Answer: A lot of pointer manipulation
x keeps its left child
y keeps its right child
x’s right child becomes y’s left child
x’s and y’s parents change
What is the running time?
y
x
C
A
B
x
A
y
B
C
Previous slide
Next slide
Back to first slide
View graphic version