MST Construction (Prim’s or Kruskal’s)

Poornima K S
Feb 1, 2022

--

What is a Minimum Spanning Tree ?

  • A minimum spanning tree is a subset of edges such that the sum of edge weights is minimum
  • A MST is constructed for an undirected weighted graph.
  • A MST does not form a Cycle.
  • All edges are. included only once

Complexity: O ( V log E )

Prim’s Algorithm

Kruskal’s Algorithm

Points to remember:

  • This uses the union-find algorithm to construct the MST edge by edge.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Poornima K S
Poornima K S

No responses yet

Write a response