xxxxxxxxxx
1) O(V2) -> Graph is represented using Matrix ..
2) If the input graph is represented using an adjacency list,
then the time complexity of Prim’s algorithm can be reduced to O(E log V)
with the help of a binary heap.
--- V = number of vertices E = number of Edges
xxxxxxxxxx
1) O(V2) -> Graph is represented using Matrix ..
2) If the input graph is represented using an adjacency list,
then the time complexity of Prim’s algorithm can be reduced to O(E log V)
with the help of a binary heap.
--- V = number of vertices E = number of Edges