Am I correct in saying thattraverse(node):    if node is null, return    print node    traverse(node's right subtree)    traverse(node's left subtree)would produce output that is the reverse of post-order traversal?post-order(node):    if node is null, return    post-order(node's left subtree)    post-order(node's right subtree)    print nodeI am mostly interested because if this is true, it greatly simplifies the iterative method for post-order traversal. It feels right with a hand-wavey explanation - and with testing on some trees - but how would I prove it?
Binary tree traversals reversed
algorithms;trees;binary trees;graph traversal
I would say you are right. If the post order of a tree is left-recursion, right-recursion, root then the reverse is root, reverse-right-recursion, reverse-left-recursion, which is exactly what you propose. Technically the proof would state by induction on the structure of the tree. 