Bloomberg Interview Question

1st round - inorder tree reversal