1462. Course Schedule IV

https://leetcode.com/problems/course-schedule-iv/

Some algorithm called Floyd-Warshall,

I was heading to a wrong direction at first (Topological sort) still don't know how to do it with topological sort algo

Related Problem:

For directed graph, for each query query[x][y] asks if x is preq of y

you want to know inside this graph if x and y is connected in this direction

Last updated