check which combination in y became x with minimum swaps. we can swap as may times and any 2 elements. Expected output=[3 4 4 3 2 3 3 4] my output=[6 6 7 4 4 5 6 7]