...

/

Challenge 10: Rearrange Sorted Array in Max/Min Form

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 ...