摘要: 超时的代码如下,主要思路是使用堆栈存储每个柱子的高度,然后用每一层减去上一个该高度所在位置 思路没问题就是超时了 class Solution { public: int trap(vector<int>& height) { int m =0; int l = height.size(); int 阅读全文
posted @ 2022-02-22 17:33 jozon 阅读(47) 评论(0) 推荐(0)