Why it matters
Kruskal is standard MST algorithm. Understanding shapes graph problems.
Advertisement
The architecture
Sort edges by weight.
For each: union endpoints if different components.
V-1 edges = MST.
Advertisement
How it works end to end
DSU: path compression + union by rank.
Nearly linear union operations.
Sorted edges: O(E log E).