Pergunta de entrevista da empresa Amazon

Topological Sort, Course Scheduling Question