Pregunta de entrevista de Electronic Arts

what is wrong with this function