Pattern2 visualizers
Graphs / Minimum Spanning Tree Pattern Visualizers
The Graphs / Minimum Spanning Tree pattern is a recurring algorithmic shape that appears across coding interviews and competitive problems. Use it when the problem geometry matches its trigger conditions — recognizing the pattern collapses what looks like a hard problem into a familiar template. These visualizers trace Graphs / Minimum Spanning Tree step-by-step on classics such as Kruskal's Algorithm (MST), Prim's Algorithm (MST), so you can internalize the moves before you ever need them under pressure.
Graphs
Kruskal's Algorithm (MST)
Constructs a Minimum Spanning Tree greedily by sorting edges by weight and using a Disjoint Set structure to safely combine components.
Open visualizer →
Graphs
Prim's Algorithm (MST)
Constructs a Minimum Spanning Tree greedily by growing a single connected component and selecting the cheapest incident edge at each step.
Open visualizer →