Amazon interview question

Graph Question - Variations on Course Schedule on Leetcode