← Back to All Algorithms

🌲 Kruskal's MST Algorithm

How It Works (Greedy)

  1. Sort all edges by weight (ascending)
  2. For each edge, check if it creates a cycle (using Union-Find)
  3. If no cycle, add edge to MST
  4. If cycle, reject edge
  5. Stop when MST has V-1 edges
Click "Start" to find Minimum Spanning Tree