Anonymous interview question

Sort the given array in a two dimensional form