Kruskal's Minimum Spanning Tree Visualizer
Step-by-step Kruskal's MST calculator showing sorted edge processing, disjoint-set (DSU) cycle checks, and accepted/rejected edges.
Kruskal's MST
Enter your custom input data → Run the real algorithm engine → Observe step transitions.
⚙️ Customize Algorithm Input Data
Sorted 6 edges by weight
Kruskal's algorithm processes smallest edges first
Initialized Disjoint Set Union (DSU)
Interactive SVG Graph Canvas
Mathematical Formula
Overview & Explanation
Kruskal algorithm finds a Minimum Spanning Tree for a connected weighted graph.
How It Works
- Sort all edges in non-decreasing order of weight.
- Pick the smallest edge and check if it forms a cycle with the spanning tree formed so far.
- Repeat until V-1 edges are included.
Practical Applications
- Network cable layout optimization
- Cluster analysis
Kruskal MST Example
Edges: (A-B, 1), (B-C, 2), (A-C, 3), (C-D, 4)
Edge A-B
Weight 1
Edge B-C
Weight 2
Frequently Asked Questions
What is the time complexity of Kruskal's algorithm?
Related Calculators
Dijkstra Algorithm Calculator & Visualizer
Step-by-step Dijkstra shortest path algorithm runner with distance tables, priority queue state, and edge relaxation logs.
Breadth First Search (BFS) Visualizer
Step-by-step BFS graph traversal visualizer tracking queue operations and visited node sets.
Bubble Sort Visualizer & Step Calculator
Interactive step-by-step Bubble Sort execution visualizer with comparisons, swaps, and time complexity breakdown.