Par=[1,2,3,4,5,6,7,8,9,10] intially,
and after the query 6 9 44 , shouldn’t the Par=[1,2,3,4,5,7,8,9,10,10] instead of Par=[1,2,3,4,5,10,10,10,10,10].
Since in get function we are doing while(x!=Par[x]){
Par[x]=Par[Par[x]]; x=Par[x];}
return x;
Can you please explain how did we arrive at the second Par array instead of first one after the query?