Pregunta de entrevista de Unity

How would you solve this problem?