Microsoft Interview Question

question about tree traversal problem.