Pergunta de entrevista da empresa Meta

they asked about dividing an array in order to meet a given condition.