Kruskal's Algorithm

Kruskal's Algorithm

Steps In The Algorithm

  1. Sort all edges in increasing order of their edge weights.
  2. Pick the edge with the least weight.
  3. Check if the new edge creates a cycle or loop in the spanning tree.
  4. If it doesn't form the cycle, the include that edge in the minimum spanning tree.
  5. Repeat step 2-4 until |V| - 1 edges in the minimum spanning tree.

To learn more about Kruskal's algorithm, follow the link below:

Kruskal's Algorithm In Wikipedia