FUnction to perform union operation of disjoint set union
static void Union ( int [ ] parent , int [ ] rank , int [ ] maxValue , int a , int b ) { a = Find ( parent , a ) ; b = Find ( parent , b ) ; if ( a == b ) return ;