Pergunta de entrevista da empresa Amazon

course schedule problem of graph in a different manner