Skip to content

Commit 95019a2

Browse files
authored
Update Readme.md
1 parent 1219143 commit 95019a2

File tree

1 file changed

+2
-2
lines changed
  • Two_Pointers/011.Container-With-Most-Water

1 file changed

+2
-2
lines changed

Two_Pointers/011.Container-With-Most-Water/Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### 11. Container With Most Water
2-
####算法:双指针。  
2+
#### 算法:双指针。  
33
让左指针指向0,右指针指向height.size()-1。每次考虑如果减少横向距离1,判断应该选择移左指针还是右指针,还是考察both?  
44

55
事实上,只需要移动height[left]和height[right]中较矮的一个板子即可,这样才有使总面积增大的可能。否则移动较高的板子,只会使结果变小,因为面积受限于较矮的那块板子。
@@ -11,4 +11,4 @@ else
1111
```
1212

1313

14-
[Leetcode Link](https://leetcode.com/problems/container-with-most-water)
14+
[Leetcode Link](https://leetcode.com/problems/container-with-most-water)

0 commit comments

Comments
 (0)