Doubt PushBack 3 Challenge First

Someone please explain problem statement of challenge first problem of recent push back 3 contest by @references Problem link Contest Page | CodeChef

It says that if we are talking about 1 indexed array then the element at even position must be less than its neighboring elements if they exists. What I did was first sort the array and swap every even index elements with previous element since all elements are distinct it will give the answer.

2 Likes