add diff alert between 11 and 42

This commit is contained in:
ShusenTang 2020-06-16 22:45:59 +08:00 committed by GitHub
parent 33b488c42f
commit bed7d5f49b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {