Pregunta de entrevista de JPMorganChase

Coding question that had to do with arrays