IBM Interview Question

trees related questions and some puzzles