Wave Array
Problem Statement Sort an unsorted array arr of length n in a waveform. An array is said to be in wave form if it satisfies the following conditions: Example Example Explanation Input: arr = [7, 7, 11, 3, 4, 5, 15] Output: [4, 3, 7, 5, 11, 7, 15] or any other array in wave form. Explanation: In the ...