M

Mr. Dubey • 100.69K Points
Coach

Q. Which of the following is true?

  • (A) prim’s algorithm can also be used for disconnected graphs
  • (B) kruskal’s algorithm can also run on the disconnected graphs
  • (C) prim’s algorithm is simpler than kruskal’s algorithm
  • (D) in kruskal’s sort edges are added to mst in decreasing order of their weights
Share

Explanation by: Mr. Dubey
prim’s algorithm iterates from one node to another, so it can not be applied for disconnected graph. kruskal’s algorithm can be applied to the disconnected graphs to construct the minimum cost forest. kruskal’s algorithm is comparatively easier and simpler than prim’s algorithm.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics