pub fn kruskal(n: usize, edges: &[Edge]) -> i64