pub fn topological_sort(g: &Graph) -> Result<Vec<usize>, ErrorsJSL>Expand description
A topological order (every edge u → v has u before v) by Kahn’s algorithm, taking the
smallest ready vertex at each step, so the result is the lexicographically smallest
topological order. O((V + E) log V). Returns an error if the graph has a cycle.