void function ( int arg0 , int arg1 ) { int loc0 = findRoot ( arg0 ) ; int loc1 = findRoot ( arg1 ) ; if ( loc0 == loc1 ) return ; id [ loc0 ] = loc1 ; }
this union method will take o n time for each union call . concode_field_sep int id[] concode_field_sep int findRoot concode_elem_sep boolean isConnected concode_elem_sep void main