Replacing a linked child #
replaceChild lifts a separately represented replacement subtree into its original parent.
The replacement is separated from its parent and sibling and frames every record outside
the original child; one pointer update restores the whole linked-tree representation.
Place a distinguished child on the selected side of a linked parent.
The parent contributes one address alongside its child and sibling.
Separation of a child, its sibling, and their parent.
The representation of a node whose distinguished child is on the selected side.
The root of a node is its label, whichever side its distinguished child is on.
The root of a tree is one of its addresses.
Agreement on the addresses of a tree transports its representation.
Exchanging the side and the two subtrees gives the same node.
Replacing the distinguished child of a node by a tree with the same root, in a heap that agrees outside the old child, keeps the node represented.
Reconnect a replacement child separated from its parent and sibling. Updating the parent link preserves the sibling, global address separation, and all external records.