摘要:
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.这题目是:是Largest Rectangle in Hisgoram的升级版本。 只要那个问题解决了,然后for int i = 0 to i > &matrix) { // Start typing your C/C++ solution below // DO NOT write int main() functio... 阅读全文
摘要:
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.Above is a histogram where width of each bar is 1, given height =[2,1,5,6,2,3].The largest rectangle is shown in the shaded area, which has ar 阅读全文