This was a question in an internal exam conducted by TCS, when I was working there.
The goal is to take an array of elements, then swap them alternatively, so if we have an array like [1, 2, 3, 4, 5, 6, 7, 8, 9, 0], after swapping it should look like this [2, 1, 4, 3, 6, 5, 8, 7, 0, 9]