Pergunta de entrevista da empresa Microsoft

Given an array of binary values ( 0 or 1 ) return the sub array with the maximum size which contains the same number of zeros and ones.