Pergunta de entrevista da empresa Google

The question was based on graph and binary trees.