Add union find that uses weighted quick union method