Challenge 10: Rearrange Sorted Array in Max/Min Form
Arrange elements in such a way that the maximum element appears first, then the minimum second, then second maximum at the third position, the second minimum at fourth, and so on.
Problem statement
Implement a function maxMin(int arr[], int size)
, which takes a sorted array arr
and its size and will rearrange the elements of a sorted array such that the first position will have the largest ...