Interview question on constraint

In reply to Yash_wanth12345:

In reply to burra thanuja:
function void post_randomize();
array[$urandom_range(0,9)]=array[$urandom_range(0,9)];
endfunction

$urandom_range(0,9) will return any number between 0 to 9, so there is no guarantee that you will always get different index values in LHS and RHS.