Pregunta de entrevista de MORSE Corp

How would you make this solution more efficient?