leetCode. 85. 最大矩形 部分参考上一题链接 leetCode.84. 柱状图中最大的矩形 此题思路 代码 class Solution {public:int largestRectangleArea( vector<int>& h ) {int n = h.size();vector<int> left( n ), right( n );stack<int>
题目: 题解: class Solution {public int maximalRectangle(char[][] matrix) {int m = matrix.length;if (m == 0) {return 0;}int n = matrix[0].length;int[][] left = new int[m][n];for (int i = 0; i < m; i++)
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. For example, given the following matrix: 1 0 1 0 01 0 1 1 11 1 1 1 11 0 0 1 0