They don't make bugs like Bunny anymore. Olav Mjelde
Prime Algorithm helps to find minimum-spanning-tree. Prims algorithm is useful when a graph with lots of edges. It is significantly faster in the limit when dense graph with many more edges than vertices. Kruskal performs better in sparse graphs and it uses simpler data structures.
Write program to implement prim's algorithm
Minimum Spanning Tree is: 1 -- 0 2 -- 1 3 -- 4 4 -- 5 5 -- 2 6 -- 5 7 -- 6 8 -- 2 Minimum spanning tree Cost is: 40
Comments
Please login to add comments.