Tripadvisor interview question

Basic binary tree question.