Morris Postorder Traversal alters the Binary Tree. Is it possible to recover the initial tree after the traversal?
Usually you would change the tree back after the traversal.
Look at the detailed answer here: Can we use Morris traversal for postorder?
It has a great code example. Just might save you some headache.