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.
For old root with left child and untouched subtrees , change the shape from to . Both have inorder sequence . In a destructive traversal that only rotates at the current root, this transformation extends the right spine by one node and decreases the left-size potential by one.

Articles by others on the same topic (0)

There are currently no matching articles.