Original Description on LeetCode is : Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
This description was wrong. It should be "Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containingONLY ones and return its area."
suppose we have a matrix:
0, 0, 1, 0
0, 0, 0, 1
0, 1, 1, 1 ---> largest area should be
0, 0, 1, 1
0, 0, 1, 0
0, 0, 0, 1
0, 1, 1, 1
0, 1,
1, 1 --> maxArea is 4.
Will update the solution tomorrow. 
本文针对LeetCode上的一个问题进行了解释与修正:即在一个由0和1填充的二维矩阵中寻找只包含1的最大矩形区域,并返回该矩形的面积。
467

被折叠的 条评论
为什么被折叠?



