---
tags: AC LeetCode 刷題讀書會 - 2023
---
# 2023/06/18(日) 每週 LeetCode 刷題
## 刷題題號
- [11. Container With Most Water](https://leetcode.com/problems/container-with-most-water/)
## 解題思路
You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).
<pre style='background-color:#ggg'>
將x陣列繪製為x軸,並將y陣列繪製為y軸。
</pre>
<pre style='background-color:#ggg'>
//x = [1, 2, 3, 4, 5, 6, 7, 8, 9]
//y = [1, 8, 6, 2, 5, 4, 8, 3, 7]
</pre>
Find two lines that together with the x-axis form a container, such that the container contains the most water.
Return the maximum amount of water a container can store.
ex.將x軸設為長度,並以y軸最低點為高度,判斷最大的容量(x * y)。
## 回報格式
- 請 Fork 此 Replit 連結(https://replit.com/@AllenLi23/AC-LeetCode-Js-11-Container-With-Most-Water)後,進行程式碼解題,並於完成後更新到 Replit 中,再將連結貼至「解題分享區」來與大家交流做法。
解題分享區
---
讀書會議流程:
ex. 21:05開始
#簽到表:
https://docs.google.com/spreadsheets/d/1gc16rrF-yZNs845z_nYrdgDIiSECOJok30dNLyQm69A/edit#gid=534323210
1. 題目說明。
2. 題目解析(BigO(n^2) => BigO(n))。
4. 成員分享解題思路。
5. 問題與討論。
<!-- No.0 (請依序排序下去)
name: name (回報範例)
lighthouse: lighthouse
Replit:https://replit.com/@AllenLi23/AC-LeetCode-Js-11-Container-With-Most-Water-Allen
-->
<!-- No.1
name: Kai
lighthouse: pythonforeye@gmail.com
Replit: https://replit.com/@Beginneraboutli/AC-LeetCode-Js-11-Container-With-Most-Water#index.js
-->
<!-- No.2
name: vanessa
lighthouse: mali7591@hotmail.com
Replit:https://replit.com/@vanessalin3/AC-LeetCode-Js-11-Container-With-Most-Water#index.js
-->
<!-- No.3
name: Jack Hung
lighthouse: lhhungx@gmail.com
Replit:https://replit.com/@LungHsuanHung/AC-LeetCode-Go-11-Container-With-Most-Water#main.go
-->
<!-- No.4
name: Jerry
lighthouse: jerry12011013@gmail.com
Replit:https://replit.com/@Jerry-Chang975/AC-LeetCode-Js-11-Container-With-Most-Water#index.js
-->
<!-- No.5
name: 永C
lighthouse: jerry12011013@gmail.com
Replit:https://replit.com/@yongsin0129/AC-LeetCode-Js-11-Container-With-Most-Water#index.js
-->
<!-- No.6
name: Winnie
lighthouse: yaysa903@gmail.com
Replit:https://replit.com/@WinnieLin7/AC-LeetCode-Js-11-Container-With-Most-Water#index.js
-->
<!-- No.7
name: Bun
lighthouse: bun.coding@gmail.com
Replit:https://replit.com/@Shu-YinChen/AC-LeetCode-Js-11-Container-With-Most-Water#index.js
-->