Topic: Greedy Algorithm Problem / Level: intermediate

Problem: Given an array of integers, rearrange the array so that adjacent elements are as different as possible while maintaining the array order.

Run the code to see the output here...