An alternative array is an array in which first element is maximum of the whole array second element is minimum of the whole array. Third element is the second largest. Fourth element is the second smallest And so on. print the array in the desired manner.
I know the Qus and concept. But don't know the code.
Give the code with comment
Sample Input :
5 1 7 11 16 19
Sample Output :
19 1 16 7 11