Pergunta de entrevista da empresa Asana

Very standard CS binary search tree question.