Tree rotation
= Tree rotation
A local change of root and child pointers that preserves inorder order. A <right rotation> promotes a left child, moves that child's right <subtree> to the old root's left position, and makes the old root its right child. The five inorder pieces remain in the same order; a left rotation reverses this transformation. Rotation does not by itself require search-tree key ordering.