85. Maximal Rectangle
Problem Statement
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:
Constraints:
rows == matrix.length
cols == matrix[i].length
1 <= row, cols <= 200
matrix[i][j]
is'0'
or'1'
.
Intuition
Links
https://leetcode.com/problems/maximal-rectangle/description/
Video Links
https://www.youtube.com/watch?v=tOylVCugy9k&ab_channel=takeUforward
Approach 1:
C++
Approach 2:
C++
Approach 3:
C++
Approach 4:
C++
Similar Problems
Last updated