title: Find the largest rectangle of 1’s with swapping of columns allowed
body: <p>I came across this problem and solution at:  <a href="http://www.geeksforgeeks.org/find-the-largest-rectangle-of-1s-with-swapping-of-columns-allowed/" rel="nofollow">http://www.geeksforgeeks.org/find-the-largest-rectangle-of-1s-with-swapping-of-columns-allowed/</a></p>
  
  <p>But I couldn't get my head around the solution provided.  Can someone please explain as to how the solution works ?</p>
  
  <p>I already tried tracing on paper and stepping into code, but couldn't understand:
  1. What role the sorting plays.
  2. How the final area is being calculated without swapping any column as the question demands !</p>
  
  <p>Any help is highly appreciated !</p>