85. Maximal Rectangle
Practice Maximal Rectangle for free on NudgeCode: Hard, Stack pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
matrix is a grid whose cells are the characters "0" or "1". Return the area of the largest axis-aligned rectangle that contains only "1" cells.
Example
matrix = [["1","1","0"],
["1","1","1"],
["0","1","1"]] -> 4 (the top-left 2 x 2 block)
matrix = [["0"]] -> 0
Constraints
- 1 <= rows, cols <= 200
- every cell is
"0"or"1"