Zig-zig step (source code)

= Zig-zig step

When a node and its parent are both left children, first apply a right <tree rotation> to the grandparent, moving the parent upward, and then another right <tree rotation> moving the selected node upward. Use the left-right mirror image when both are right children. The order of these two <tree rotations> distinguishes the operation from repeatedly rotating only the selected node.