Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Kruskal's Minimum Spanning Tree
Bookmark
Input
5 Vertices
4 Vertices
6 Vertices
Square Graph
Custom
n
=
5
,
edges
=
[{u:0,v:1,w:2},{u:0,v:3,w:6},{u:1,v:2,w:3},{u:1,v:3,w:8},{u:1,v:4,w:5},{u:2,v:4,w:7},{u:3,v:4,w:9}]
Graph
2
6
3
8
5
7
9
0
1
2
3
4
Sorted Edges
(not yet sorted)
Union-Find
Legend:
Standard
Processing
Current
In MST
Cycle
algo
master
.
io
Step:
Given a graph with 5 vertices and 7 edges. Find the Minimum Spanning Tree using Kruskal's algorithm.
0 / 16
Input
5 Vertices
4 Vertices
6 Vertices
Square Graph
Custom
n
=
5
,
edges
=
[{u:0,v:1,w:2},{u:0,v:3,w:6},{u:1,v:2,w:3},{u:1,v:3,w:8},{u:1,v:4,w:5},{u:2,v:4,w:7},{u:3,v:4,w:9}]
0 / 16
Graph
2
6
3
8
5
7
9
0
1
2
3
4
Sorted Edges
(not yet sorted)
Union-Find
Legend:
Standard
Processing
Current
In MST
Cycle
algo
master
.
io
Step:
Given a graph with 5 vertices and 7 edges. Find the Minimum Spanning Tree using Kruskal's algorithm.