title: Largest submatrix with equal no of 1's and 0's
body: <p>Given a matrix of size <code>mxn</code> containing 0's and 1's only. I need to find the largest sub-matrix which has equal number of 1's and 0's in it. Brute force approach would be <code>O(m^2*n^2)</code> Can we do any better than this? <br>
  I tried applying dynamic programming, but couldn't find any optimal substructure to it.<br><br></p>
  
  <p>I believe a similar one-dimensional version of this problem was discussed here:<br>
  <a href="https://stackoverflow.com/questions/7381050/space-efficient-algorithm-for-finding-the-largest-balanced-subarray">Space-efficient algorithm for finding the largest balanced subarray?</a> <br>
  which has an <code>O(n)</code> solution using some extra space.</p>