Parallel Courses III
HardLeetCodeShortest Paths & Topological Sort
Approach hintTry it first, then revealHide
Process courses in topological order. A course finishes at its own duration plus the latest finish time among its prerequisites; the answer is the maximum finish time over all courses.