Pregunta de entrevista de Siemens Mobility

A technical question regarding sorting