LeftRotation
Rotate the root to the left: the right child becomes the root, the root its left child.
FindStat
Mp00009via BinaryTreeLeftRotation(BinaryTree)Rotate the root to the left: the right child becomes the root, the root its left child.Typed signatures
| Type | Package | Applies |
|---|---|---|
(binary_tree) -> binary_tree | combinatorics | always |
Details
- Takes a
BinaryTreeand returns aBinaryTree— a typed map, so a wrong carrier is a type error rather than a wrong answer. - FindStat's Mp00009. A tree whose root has no right child has nothing to rotate; FindStat then moves its left subtree to the right, as [., A], and so do we. That makes it a bijection on every size, inverse to RightRotation.
Examples
About
| Examples | 1 |
|---|---|
| Crosswalk | FindStat |