Modify prims algorithm so that it runs in time on log k on


1. Does either Prim's and Kruskal's algorithm work if there are negative edge weights? Explain why or why not.

2. Modify Prim's algorithm so that it runs in time O(n log k) on a graph that has only k different edges costs.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Modify prims algorithm so that it runs in time on log k on
Reference No:- TGS02162989

Expected delivery within 24 Hours