Compare Kruskal's and Prim's algorithms step by step — see how Union-Find detects cycles and how the cut property drives greedy edge selection.
|V| − 1 edges, minimum total weight, no cycles
An MST connects all vertices using exactly |V|−1 edges with minimum total weight — no cycles. Kruskal's sorts edges by weight and greedily adds the cheapest edge that doesn't form a cycle, using Union-Find in O(α(n)) per operation.
Prim's grows the MST from a start node by always picking the cheapest edge crossing the cut between the MST and the remaining graph — the Cut Property guarantees correctness.
MSTs, shortest paths, dynamic programming — we explain the intuition behind the proof, not just the steps.