C++之Leetcode刷題筆記之堆棧

題目來源leetcode42題 https://leetcode-cn.com/problems/trapping-rain-water/ 解題思路:我沒用到堆棧(感受太麻煩),這個題目直接遍歷整個數組就好了,代碼挺簡單的,應該能看懂哈。web class Solution { public: int trap(vector<int>& height) { int len=
相關文章
相關標籤/搜索