Pregunta de entrevista de Discover

Q: How would you improve this solution?