Pregunta de entrevista de Autobrains

Regarding my solution to programming exercise