We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c5814e commit c934be0Copy full SHA for c934be0
โcontainer-with-most-water/sungjinwi.py
@@ -1,3 +1,16 @@
1
+"""
2
+ ํ์ด :
3
+ left, right ์ปค์๋ฅผ ์ ๋์ ๋๊ณ ์กฐ๊ฑด์ ๋ฐ๋ผ ๋ฐ๋ํธ์ผ๋ก ์ด๋์ํค๋ฉฐ ๋ฌผ ์ ๋น๊ต
4
+ ๋ ์ค ๋ ๋์ ๋์ด๋ฅผ ์ด๋์ํค๋ฉด ๋ฌด์กฐ๊ฑด ๋ฌผ์ ์์ด ์ค์ด๋ค๊ธฐ ๋๋ฌธ์ ๋ ๋ฎ๊ฑฐ๋ ๊ฐ์ ์ปค์๋ฅผ ์ด๋์ํค๋ฉฐ ์ ๋ฐ์ดํธ
5
+ ๋์ด ๋ง๋๋ฉด ๋น๊ต ์ข ๋ฃ
6
+
7
8
+ len(height) : N
9
+ TC : O(N)
10
+ l, r์ ์ด๋์ด ์ ์ฒด height ๊ฐ์๋งํผ ์ผ์ด๋๋ฏ๋ก
11
+ SC : O(1)
12
13
14
class Solution:
15
def maxArea(self, height: List[int]) -> int:
16
l = 0
0 commit comments