Amazon Interview Question

problem solving in binary trees