Performs a single right rotation (also called "zig" when moving left child up)
This is the fundamental building block of splay operations. In splay tree terminology:
Transforms: P C / \ -> / C Z X P / \ / X Y Y Z
the tree to rotate (P in the diagram)
the new root after rotation (C in the diagram)
Performs a single right rotation (also called "zig" when moving left child up)
This is the fundamental building block of splay operations. In splay tree terminology:
Transforms: P C / \ -> /
C Z X P / \ /
X Y Y Z