Q.

Prim’s algorithm is a              

A. divide and conquer algorithm
B. greedy algorithm
C. dynamic programming
D. approximation algorithm
Answer» B. greedy algorithm
Explanation: prim’s algorithm uses a greedy algorithm approach to find the mst of the connected weighted graph. in greedy method, we attempt to find an optimal solution in stages.
901
0
Do you find this helpful?
10

Discussion

No comments yet