Pregunta de entrevista de Microsoft

Binary Tree problem. Medium difficulty