Pregunta de entrevista de Age of Learning

How would you solve this issue?