Back to all patterns

Prim's or Kruskal's MST

1 problems • Practice on LeetCode to earn credits

About This Pattern

Master the Prim's or Kruskal's MST pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Medium (1)

Min Cost to Connect All Points

Find minimum cost to connect all points (minimum spanning tree).

Key Signals:

Minimum spanning treeAll pairs distancesGreedy selection