Skip to content

Kruskal Example

```mermaid graph LR subgraph Step 4: MST A4[“A”] ←2→ D4[“D”] D4[“D”] ←4→ C4[“C”] A4[“A”] ←9→ B4[“B”] end

subgraph Step 3
A3["A"] <--2--> D3["D"]
D3["D"] <--4--> C3["C"]
B3["B"]
end


subgraph Step 2
A2["A"] <--2--> D2["D"]
B2["B"]
C2["C"]
end

subgraph Step 1
A1["A"]
B1["B"]
C1["C"]
D1["D"]
end


subgraph Original Graph
A <--5--> C
A <--2--> D
C <--4--> D
A <--9--> B
end

```