Add weighted quick union (with path compression)