Anonymous Interview Question

Sort the given array in a two dimensional form