Google Interview Question

The final interview had a tricky question about converting a post-order tree to pre-order.