Pergunta de entrevista da empresa Electronic Arts

what is wrong with this function