Q.

Prim’s algorithm can be efficiently implemented using            for graphs with greater density.

A. d-ary heap
B. linear search
C. fibonacci heap
D. binary search
Answer» A. d-ary heap
Explanation: in prim’s algorithm, we add the minimum weight edge for the chosen vertex which requires searching on the array of weights. this searching can be efficiently implemented using binary heap for dense graphs. and for graphs with greater density, prim’s algorithm can be made to run in linear time using d-ary heap(generalization of binary heap).
2.2k
0
Do you find this helpful?
25

Discussion

No comments yet