DSA · Reimagined
Graphs hard time O(E log E) space O(V)

Minimum Spanning Tree (Kruskal)

Sort every edge by weight and walk the list cheapest-first. Take an edge if it joins two separate components; skip it if both ends are already connected, since that would make a cycle. After V-1 accepted edges everything is joined as cheaply as possible.

4215863ABCDEF
edges by weight
BC
0
AC
1
EF
2
AB
3
BD
4
DF
5
CE
6

Sort every edge by weight, then walk the list from cheapest to dearest.

1 / 16
A fixed scene — scrub through it, or open the code.

Practice

Machine twin: /dsa-viz-v2/mst-kruskal.json — the full deterministic run as structured data.