Gainsight interview question

Maximum subarray of equal 0 and 1