Pregunta de entrevista de Virtusa

very basic coding question like sorting