What is the difference between Kruskal and Prim?
What is the difference between Kruskal and Prim? Prim’s algorithm gives connected component as well as it works only on connected graph. Prim’s algorithm runs faster in dense graphs. Kruskal’s algorithm runs faster in sparse graphs. It generates the minimum spanning tree starting from the root vertex. Does Prim and Read more…