1.

Kruskal’s algorithm is best suited for the dense graphs than the prim’s algorithm.(a) True(b) FalseI have been asked this question by my college professor while I was bunking the class.Question is from Minimum Spanning Tree in section Minimum Spanning Tree of Data Structures & Algorithms II

Answer»

The correct CHOICE is (B) False

Easiest EXPLANATION - Prim’s algorithm outperforms the Kruskal’s algorithm in case of the DENSE graphs. It is significantly FASTER if graph has more edges than the Kruskal’s algorithm.



Discussion

No Comment Found

Related InterviewSolutions