1.

Kruskal’s algorithm is a ______(a) divide and conquer algorithm(b) dynamic programming algorithm(c) greedy algorithm(d) approximation algorithmThis question was posed to me in an online quiz.I want to ask this question from Minimum Spanning Tree topic in division Minimum Spanning Tree of Data Structures & Algorithms II

Answer»

Right OPTION is (c) greedy algorithm

To explain: KRUSKAL’s algorithm USES a greedy algorithm approach to find the MST of the connected weighted GRAPH. In the greedy method, we attempt to find an optimal solution in stages.



Discussion

No Comment Found

Related InterviewSolutions