A boolean array is given ,find largest subarray with equal number of 1s and 0s


Actually, if we preprocess the input array and change all the
0
to1
, then the problem will be exactly the same as Longest Continous Zero Sum Subarray, and we had a much cleanerO(n)
solution in that post.