Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 31281be

Browse filesBrowse files
committed
feat: add 011
1 parent 9bc3aab commit 31281be
Copy full SHA for 31281be

File tree

1 file changed

+29
-0
lines changed
Filter options

1 file changed

+29
-0
lines changed

‎note/011/README.md

Copy file name to clipboard
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# [Container With Most Water][title]
2+
3+
## Description
4+
5+
Given *n* non-negative integers *a1*, *a2*, ..., *an*, where each represents a point at coordinate (*i*, *ai*). *n* vertical lines are drawn such that the two endpoints of line *i* is at (*i*, *ai*) and (*i*, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
6+
7+
Note: You may not slant the container and *n* is at least 2.
8+
9+
**Tags:** Array, Two Pointers
10+
11+
12+
## 思路
13+
14+
15+
16+
```java
17+
18+
```
19+
20+
21+
22+
## 结语
23+
24+
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-java-leetcode][ajl]
25+
26+
27+
28+
[title]: https://leetcode.com/problems/container-with-most-water
29+
[ajl]: https://github.com/Blankj/awesome-java-leetcode

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.