Pregunta de entrevista de E-Cell IIT Madras

How would you sort a 2D Matrix