Largest Rectangle in Histogram (直方图中最大面积) 【leetcode】
分类: leetcode面试算法题2013-09-20
21:36 131人阅读 评论(0) 收藏 举报
栈Largest
Rectangle inleetcode
题目:
Given n non-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 a......
阅读全文