C++之Leetcode刷题笔记之堆栈

题目来源leetcode42题 https://leetcode-cn.com/problems/trapping-rain-water/ 解题思路:我没用到堆栈(感受太麻烦),这个题目直接遍历整个数组就好了,代码挺简单的,应该能看懂哈。web class Solution { public: int trap(vector<int>& height) { int len=
相关文章
相关标签/搜索