Meta Interview Question

Binary Tree related problem, and a medium-level DP problem