MaxLinear interview question

Sorting of 2d array in C only