DP World interview question

Rearrange array such that elements greater ar towards right and smaller toward left