Kruskal’s algorithm and Prim’s algorithm. Each can easily be made to run in time O(E log V ) using ordinary binary heaps. By using Fibonacci heaps, Prim’s algorithm can be sped up to run in time O(E + V log V ), which is an improvement if |V | is much smaller than |E|. The two algorithms are greedy algorithms. At each step of an algorithm, one of several possible choices must be made. The greedy strategy advocates making the choice that is the best at the moment. …

YOSHI BANSAL

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store