kruskal algorithm vs prim's