Heap based fast Prims MST algorithm.