← ALL NOTES
Depth-First Search

1462. Course Schedule IV

Given course prerequisites (directed edges) and queries [u,v], answer whether u is a prerequisite (direct or indirect) of v. This is a transitive closure problem — compute, for each course, the full…

Loading…