A binary matrix ( 1 or 0 is the elements) is given where it represents
1=black and 0=white .
suppose M X N matrix is given
we have to find out the maximum black and white rectangle .there area
and position in matrix (indices of upper-left and lower-right)

matrix[4][7]=
0 1 1 0 0 0 0
0 1 1 1 1 1 0
1 0 0 1 0 0 0
0 0 0 1 0 0 0
 here maximum black rectangle is of area 5 from (1,1) to (1,5)
 here maximum white rectangle is of area 5 from (2,4) to (3,6)
if there r more than 2 ans r there than it should give all the results
in each case.

Solution is possible in O(n^4) by brut force . Checking all the
possible matrix .
But i need better solution. Time and space complexity both should
considered

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to