Pergunta de entrevista da empresa Google

its graph question. topological sort