Minimum Spanning Tree simulation animating Kruskal's and Prim's algorithms
step-by-step on a random weighted graph. Kruskal's algorithm sorts all
edges by weight and uses a Union-Find (DSU) structure to greedily add the
lowest-cost edge that doesn't create a cycle. Prim's algorithm grows the
tree from a seed node, always adding the cheapest edge connecting the
current tree to an unvisited node. Edge costs are displayed on every arc.