Delete Nodes And Return Forest
Walk the tree from the top, cut out each deleted node, and start a new tree below every cut that keeps a node.
Walk the tree from the top, cut out each deleted node, and start a new tree below every cut that keeps a node.