Algorithms

Minimum Spanning Trees

How the Prim and Kruskal algorithms build minimum spanning trees, step by step.

Why Is Kruskal's Algorithm Used?

Kruskal's algorithm sorts edges and skips any that form a loop, giving the cheapest way to connect every vertex. Here is why it is used and when it fits.

2 min read

Related topics

More in algorithms