Pregunta de entrevista de Google

Both technical questions involved binary trees.