Pregunta de entrevista de DIMOCO

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