Can someone explain how we are getting this option as the correct option?
Kruskal Algorithm has time complexity of Elog(E).
Not able to understand the answer given
Hey @sanjit_15 Kruskal’s algorithm involves sorting of the edges, which takes O(E logE) time, where E is a number of edges in graph and V is the number of vertices. After sorting, all edges are iterated and union-find algorithm is applied. union-find algorithm requires O(logV) time. So, overall Kruskal’s algorithm requires O(E log V) time.
So options a,b & d are the only one which are equivalent to time complexity O(E log V).
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.