栈
文章平均质量分 70
一颗随风而倒的墙头草
这个作者很懒,什么都没留下…
展开
-
【LeetCode】【84. Largest Rectangle in Histogram】(python版)
Description: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 ...原创 2018-08-22 11:40:35 · 284 阅读 · 0 评论 -
【每日一练】区间最大乘积
问题描述:给定一个数组序列, 需要求选出一个区间, 使得该区间是所有区间中经过如下计算的值最大的一个:区间中的最小数 * 区间所有数的和最后程序输出经过计算后的最大值即可,不需要输出具体的区间。如给定序列 [6 2 1]则根据上述公式, 可得到所有可以选定各个区间的计算值:[6] = 6 * 6 = 36; [2] = 2 * 2 = 4; [1] = 1 * 1 = 1; [...原创 2018-09-02 10:46:24 · 1927 阅读 · 0 评论