Implement Kruskal's and Prim's MST
greedy edge and vertex growth
Challenge 4 of GraphsAdvanced~60 minFree
Design least-cost networks by building a Minimum Spanning Tree. You will implement a Union-Find (disjoint set) structure, then Kruskal's and Prim's algorithms, and finally use the MST to test whether a graph is connected. Graphs are undirected with integer nodes 0..n-1 and edges given as (u, v, weight).