retagged by
697 views

1 Answer

0 votes
0 votes

Suppose you implement prims algo by adjacency matrix, Then after selecting the minimum vertex, you ll have to go through V entries corresponding to that vertex in matrix and select the minimum. So on, you do this for V vertices. So, complexity becomes O(V2)

Related questions

0 votes
0 votes
1 answer
1
Alakhator asked Oct 11, 2018
1,126 views
What is the time complexity of Prim algorithm without using min heap?
2 votes
2 votes
2 answers
2
Aishwarya Gujrathi asked Mar 27, 2018
1,320 views
Suppose prim’s algorithm is implemented using array as queue for a graph $G(V,E)$. Then what is the time complexity of Prim’s algorithm?$O (E \hspace{0.1cm}log\hspace...
1 votes
1 votes
0 answers
3
Shivam Chauhan asked Nov 2, 2017
712 views
First statement is False because complexity will be O(E2).I think the second statement is true? But not sure
3 votes
3 votes
1 answer
4
pC asked Sep 22, 2017
2,506 views
Explain Prims AlgorithmAnalysis Of Time ComplexityHow does $\mathcal{O}(VlogV + ElogV)=\mathcal{O}(ElogV)$