Kruskal’s Algorithm

Back to Minimum Spanning Tree

A greedy algorithm that builds the MST by sorting all edges by weight and adding them one by one, skipping edges that would create a cycle. Uses Union-Find for efficient cycle detection. O(E log E) time. Well-suited for sparse graphs.

algorithms graph-algorithms kruskals mst