Quick Union and Enhanced Quick Union solution