convert the problem in such a way that each row becomes an array of histogram in which you have to find the maximum are of rectangle.
convert the problem in such a way that each row becomes an array of histogram in which you have to find the maximum are of rectangle.