New graph Kruskal algorithm.