int n;
vector<int>p, v;
int get(int a){
return p[a] = (a==p[a]) ? a : get(p[a]);
}
void unin(int a, int b){
a = get(a);
b = get(b);
p[a] = b;
}
I implemented this code when I was solving problems about Dsu in section Edu..now if I used path compression in get function but I donot Consider the samllest set and larget set in union ..can the comlexity reach O(N)