Rearrange the Array by shifting middle elements to start and end alternatively
Given an array, the task is to shift the middle element to the start and end of the array alternatively, till the middle element becomes equal to the first element of the original array. Input: arr[]=[2, 8, 5, 9, 10]Output: [9, 5, 2, 10, 8]Explanation: We can get this output by shifting middle eleme