A function that does union of two sets of x and y ( uses union by rank )
void unionSet ( struct subset subsets [ ] , int x , int y ) { int xroot = findSet ( subsets , x ) ; int yroot = findSet ( subsets , y ) ;