🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Kruskal

In plain terms

Builds a minimum spanning tree by adding cheapest safe edges.

Going deeper

Kruskal's algorithm sorts edges by weight and adds each if it doesn't form a cycle, until all nodes connect. It uses union-find to detect cycles.

Under the hood

O(E log E) dominated by sorting; greedy and relies on disjoint-set for efficient cycle checks.

Examples

Network design, clustering, minimum spanning trees, circuit layout.

Think of it like...

Like connecting towns with the cheapest roads first, skipping any that create a loop.

Feedback & Bug Report