Pergunta de entrevista da empresa Google

There was a question on binary trees that I could not figure out.