Pregunta de entrevista de Amazon

Topo sort (look it up on leetcode)