Time Complexity of Kruskal - O(mlogm + n.O(1) + m.logn)
mlogm --> for sorting edges in increasing order.
n.O(1) --> n UNIONS as we've n nodes in G and each takes O(1)
m.logm --> Find operation takes logn time as height of tree can never me more than logn and we have m such find operations as we have m edges in G.
Now my doubt is - is it O(mlogm) or O(mlogn)? I know, given is O(mlogn), but how?