pub fn connected_components(a: &[usize], b: &[usize], n: usize) -> Vec<i32>
Connected-component label (the 0-based root node index) for each of n nodes, given undirected a–b adjacency pairs.
n
a
b