Pregunta de entrevista de Huboo

How can you improve this code further?