Tripadvisor Interview Question

Basic binary tree question.