M

Mr. Dubey • 52.77K Points
Coach

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
Share

Explanation by: Mr. Dubey
 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).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Loading Comments....

Question analytics