Meta Interview Question

2 questions about tree, and another one is a backtracking problem.