• set the id of p's root to the id of q's root (only need to change one value in the array)