Replaces the subtree rooted at a given node with a new node. The function updates parent pointers accordingly.
The node to replace
The new node to replace the old node with
The new child node or null if the child node was a root node
If the child node does not have a parent node set
Generated using TypeDoc
Replaces the subtree rooted at a given node with a new node. The function updates parent pointers accordingly.