mirror of
https://github.com/ShusenTang/LeetCode.git
synced 2026-08-24 07:34:42 +08:00
add diff alert between 11 and 42
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
可以考虑设置两个初始分别为两端的指针left和right代表当前容器,不断跳过高度不够高的height使这两个指针往中间靠。这个过程不断循环即可得到结果。
|
||||
时间复杂度O(n),空间复杂度O(1)
|
||||
|
||||
> 注意不要把此题和[42. Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/)题搞混了!!
|
||||
|
||||
# C++
|
||||
``` C++
|
||||
class Solution {
|
||||
|
||||
Reference in New Issue
Block a user