Apptio Interview Question

tree treversal based