[LeetCode]*85.Maximal Rectangle

题目 Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area. 思路 对于上图的一个01矩阵。我们可以一行一行的分析,假设第三行,我们按列扫描,遇到0时,柱子断开,重新形成柱子,遇到1时柱子高度加一。这样的话,我们就可以把
相关文章
相关标签/搜索