1
1.6kviews
Write down Prims algorithm and solve the following problem

Subject: Analysis Of Algorithm

Topic: Greedy Method

Difficulty: High

enter image description here

1 Answer
0
32views

Prim's Algorithm

Step 1 -

  • Check whether the graph contains any loops and parallel edges or not.
  • If a graph contains any loops and parallel edges, then remove all loops and parallel edges.

Step 2 -

  • Randomly choose any vertex, but the vertex connecting to the edge having the least …

Create a free account to keep reading this post.

and 2 others joined a min ago.

Please log in to add an answer.