FUnction to perform union operation of disjoint set union
def Union ( parent , rank , maxValue , a , b ) : NEW_LINE INDENT a = Find ( parent , a ) NEW_LINE b = Find ( parent , b ) NEW_LINE if ( a == b ) : NEW_LINE INDENT return NEW_LINE DEDENT DEDENT