Course Schedule / Topological Sort

Given an integer numCourses (courses labeled 0..numCourses-1) and a list prerequisites where each pair [a, b] means you must take course b before course a:

  1. Determine whether it is poss...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: