Is it possible to implement Prim's algorithm using fibonacci heap too? Any kind of assistance is welcome.
1 Answer
Any type of min heap will do for Prim's algorithm. However, please note that although Fibonacci heap has better asymptotic complexity for some operations than binary heap, I've empirically proven that because of the big constant, it outperforms the binary heap only for really big graphs(in the order of billion or even tens of billions edges).
O(n*log(n))not in O(log(n))