fix tree generate with last empty node
add postorder traversal without recursion