Last updated 4 years ago
Our array is {0x1, 0xa, 0x3, 0x2, 0x5, 0x9, 0x8, 0x7, 0x4, 0x6}
{0x1, 0xa, 0x3, 0x2, 0x5, 0x9, 0x8, 0x7, 0x4, 0x6}
And every number we enter swaps arr[i] with arr[i+1]
swaps arr[i]
arr[i+1]
went brrr and I got the swaps
(10 causes it to check the array)
1 2 3 4 5 6 7 8 1 4 5 6 7 4 5 6 4 5 3 10