Tree ReplaceNode(this Tree tree, Node oldNode, Node newNode)
Tree ReplaceNode(this Tree tree, Node oldNode, Node newNode)
to replace nodes in this tree (i.e. return a new tree with a node replaced), but I have no idea how to do this efficiently. Is there some common algorithm or something for this?