DIMOCO interview question

I was asked to write a sorting algorithm for a 2d array.