There is a problem to find the maximum area of the 1 in the 0-1 matrix. In this problem there are two cases:
area to be measure is of shape square. that's simple one by DP.
area to be measure is of the shape of rectangle. i am not able to think a optimal solution for this.
Example:
010101
101001
111101
110101
The largest rectangle has an area of 4 (3rd row , 5th column and one more in 3rd,4th row). Can we also get all those rectangle ?