Bloomberg interview question

Some binary tree problem, original LC problem.