# Analysis Of Prims Algorithm Time Complexity

1.5k views

Explain

• Prims Algorithm
• Analysis Of Time Complexity
• How does $\mathcal{O}(VlogV + ElogV)=\mathcal{O}(ElogV)$

retagged

The no. of edges in a sparse graph can be $(V-1)$ and in dense, it may go up to $O(V^2)$

therefore it wouldn't be incorrect to write$O(ElogV +VlogV)= O(ElogV)$

edited
4
if connected :)
0
Oh yes

## Related questions

1
568 views
I have seen many varients of complexities using diferent data structures in implementing Prims Agorithm. Can you pls post standard algorithm and tells me in details how to derive the complexities. Please also mention the variations possibles when data structure changes and How will effect the complexity taking Best case and Worst case senarios .