what is the time-complexity in kruskal algorithm for the overall step 2 where for each vertex Make-set function is called ? How come overall time for this step is O(v log v) ?
We are performing this Operation for all the vertices in the Initial phase only so for every iteration , we have a single set for one vertex so in each iteration we are making one set for one element so how come overall time is O(vlogv) ?
We perform Make-set operation only once right because after we come out of loop we have v sets of 1 vertex each .
Please explain this clearly .