Explain Kruskal's Algorithm.

Explain Kruskal's Algorithm.

Approach: Describe a greedy algorithm to find the Minimum Spanning Tree.

An algorithm that finds a Minimum Spanning Tree (MST) for a connected weighted graph. It sorts all edges by weight and adds them to the MST as long as they do not form a cycle, using Union-Find to track connectivity.

Follow-up: What is the complexity if edges are already sorted?

Key concepts: greedy, edge sorting, union-find.