Pregunta de entrevista de Amazon

Topological sorting algorithm with machine learning context