DOUBT regarding calling find function again while union

while finding the source parent and destination parent we have already called find() and have got souce parent and destination parent .

in the video when parent_of _src != parnt_of_destiantion
we have called union on both src parent and destination parent

but in union sir again called the find function to find out the parent (i think this is unnecesay )

i want to know whether this calling of find () in union is must or not

It is not necessary to again call find function in union. If you have already called fing function to check whether the parent of source and destination are equal or not, then simply make parent of source as parent of destination in union.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.