Bloomberg interview question

Q1. Graph Q2. Construct Tree from preorder and postorder