1.

Kruskal’s algorithm is best suited for the sparse graphs than the prim’s algorithm.(a) True(b) FalseThe question was posed to me at a job interview.Asked question is from Minimum Spanning Tree topic in portion Minimum Spanning Tree of Data Structures & Algorithms II

Answer» CORRECT choice is (a) True

For EXPLANATION: Prim’s algorithm and Kruskal’s algorithm perform equally in case of the sparse graphs. But Kruskal’s algorithm is simpler and EASY to work with. So, it is BEST suited for sparse graphs.


Discussion

No Comment Found

Related InterviewSolutions