Search
⌘K

Leetcode 1462. Course Schedule IV

Given a DAG of course prerequisites, determine for each query whether there is a directed path from course u to course v (i.e., whether u is an indirect or direct prerequisite of v). With numCourses ≤ 100 and up to 10^4 queries, the core challenge is efficiently precomputing reachability/transitive closure to answer many queries quickly.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.