2 subtopics · 5 problems
Minimum Spanning Tree
Kruskal's and Prim's algorithms for minimum spanning trees.
01Kruskal's Algorithm
Sort edges by weight, use DSU to greedily build the MST.
1 medium2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 472DDesign Tutorial: Inverse the Problem | medium | Solve |
| 1513DGCD and MST | hard | Solve |
| 609EMinimum spanning tree for each edge | hard | Solve |
02Prim's Algorithm
Grow MST from a vertex using a priority queue.
2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 545EPaths and Trees | hard | Solve |
| 1108FMST Unification | hard | Solve |
Was this helpful?