An inorder binary tree traversal can be implemented in a non-recursive
way with a stack. For example, suppose that when a 6-node binary tree
(with the keys numbered from 1 to 6) is traversed, the stack operations
are: push(1); push(2); push(3); pop(); pop(); push(4); pop(); pop();
push(5); push(6); pop(); pop(). Then a unique binary tree (shown in
Figure 1) can be generated from this sequence of operations. Your task
is to give the postorder traversal sequence of this tree.
Figure 1