Can a Binary Tree be recovered after performing Morris Postorder Traversal?

127 Views Asked by At

Morris Postorder Traversal alters the Binary Tree. Is it possible to recover the initial tree after the traversal?

1

There are 1 best solutions below

0
jshariar On BEST ANSWER

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.