Pregunta de entrevista de Fidelity Investments

Based on some sorting and ordering.