Pergunta de entrevista da empresa TeamViewer

In an infinite numbers array, find the midpoint and make first half with even elements and second with odd but use the values inside the array.