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