We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1219143 commit 95019a2Copy full SHA for 95019a2
Two_Pointers/011.Container-With-Most-Water/Readme.md
@@ -1,5 +1,5 @@
1
### 11. Container With Most Water
2
-####算法:双指针。
+#### 算法:双指针。
3
让左指针指向0,右指针指向height.size()-1。每次考虑如果减少横向距离1,判断应该选择移左指针还是右指针,还是考察both?
4
5
事实上,只需要移动height[left]和height[right]中较矮的一个板子即可,这样才有使总面积增大的可能。否则移动较高的板子,只会使结果变小,因为面积受限于较矮的那块板子。
@@ -11,4 +11,4 @@ else
11
```
12
13
14
-[Leetcode Link](https://leetcode.com/problems/container-with-most-water)
+[Leetcode Link](https://leetcode.com/problems/container-with-most-water)
0 commit comments