0085. Maximal Rectangle
https://leetcode.com/problems/maximal-rectangle
Description
Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.
Example 1:

Example 2:
Example 3:
Example 4:
Example 5:
Constraints:
rows == matrix.lengthcols == matrix[i].length0 <= row, cols <= 200matrix[i][j]is'0'or'1'.
ac1: Stack
similar with #84
Last updated
Was this helpful?