Minimum Spanning Tree Visualization

interactive Kruskal · Prim

Algorithm Notes

Summary: Sort edges by weight; add if it doesn't form a cycle (Union-Find).
Time: O(E log E) ≈ O(E log V)
Space: O(V)
Use: Sparse graphs; simple with DSU for cycle detection.

Big-O Guide

Ready