Topic: Array Problem / Level: intermediate

Problem: Rearrange an array such that every element is greater than the element before it and smaller than the element after it.

Run the code to see the output here...