Pergunta de entrevista da empresa Haystack TV

Organize an array such that all odd elements are in front and even elements at the end