Little modification


Simolar question was asked in Walmart with a change that you have to get maximum area in minimum number of swaps.
Anyone has approch for this ?


We have the count of ones and a row wise sorted matrix from the solution of this question, then we just have to know which row we are getting maximum area in, then find out min swaps that have been done to sort that row, which can be found out by quick sort I think.
Please let me know whether it works or not.