title: Finding the largest subarray with equal number of 0's and 1's
body: <p>So, I have an array containing only 0's and 1's. I have to find out the largest subarray containing equal number of 0's and 1's. One can be a naive approach have complexity as <code>O(n^2)</code> where I take every element in outer loop and calculate possible subarrays in the inner loop and keep updating the maximum size, if found. Is there any other better approach (something like O(n)) that I can use? Thanks!</p>
  
  <pre><code>Input: arr[] = {1, 0, 1, 1, 1, 0, 0}
  Output: 1 to 6 (Starting and Ending indexes of output subarray)
  </code></pre>