...

/

Challenge: Array Waveform

Challenge: Array Waveform

Let’s solve the array waveform problem.

Problem

Given an array of integers, arrange the array elements in a wavefrom such that the element at the odd indices are less than or equal to their neighboring elements ...