Pregunta de entrevista de PepsiCo

How to improve your code to be more efficient?