stack
bwcxljsm
这个作者很懒,什么都没留下…
展开
-
84. Largest Rectangle in Histogram
84. Largest Rectangle in HistogramGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,原创 2020-10-03 10:33:35 · 178 阅读 · 0 评论 -
84. Largest Rectangle in Histogram
84. Largest Rectangle in HistogramGiven 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.Example:Input: [2,1,5,6,2,3]Output: 10题目大意给出一个直方图,求可以组成原创 2020-10-02 14:50:35 · 169 阅读 · 0 评论 -
402. Remove K Digits
402. Remove K DigitsGiven a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.Note:The length of num is less than 10002 and will be ≥ k.The given num does not contain any原创 2020-09-28 22:49:26 · 184 阅读 · 0 评论 -
880 Decoded String at Index
880 Decoded String at IndexAn encoded string S is given. To find and write the decoded string to a tape, the encoded string is read one character at a time and the following steps are taken:If the character read is a letter, that letter is written onto原创 2020-09-26 20:54:38 · 153 阅读 · 0 评论 -
456. 132 Pattern
456. 132 PatternGiven an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k and nums[i] < nums[k] < nums[j].Return true if there is a 132 pattern in nums, otherwise retu原创 2020-09-25 09:56:44 · 151 阅读 · 0 评论 -
173 Binary Search Tree Iterator
173 Binary Search Tree IteratorImplement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Example:[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上原创 2020-09-12 11:12:28 · 107 阅读 · 0 评论 -
1209. Remove All Adjacent Duplicates in String II
1209. Remove All Adjacent Duplicates in String IIGiven a string s, a k duplicate removal consists of choosing k adjacent and equal letters from s and removing them causing the left and the right side of the deleted substring to concatenate together.We re原创 2020-09-09 20:16:32 · 166 阅读 · 0 评论