摘要: 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. For example, Given height = [2,1,5,6,2,3], return 10. Solution: 1. Only calucate area when reaching local maximum value. 2. Keep a n... 阅读全文
posted @ 2014-04-09 11:06 beehard 阅读(112) 评论(0) 推荐(0) 编辑