Pergunta de entrevista da empresa E-Cell IIT Madras

How would you sort a 2D Matrix