pub fn tarjan_scc(graph: &[Vec<usize>]) -> Vec<Vec<usize>>Expand description
Tarjan’s algorithm for finding strongly connected components.
Returns a list of SCCs, where each SCC is a list of node indices. A cycle exists if any SCC has more than one node.