Skip to content

Commit 3771ae2

Browse files
committed
feat: 결과 요약 작성
1 parent c1637f6 commit 3771ae2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

container-with-most-water/gyeo-ri.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
"""
2+
[결과 요약]
3+
# 시도한 로직 수: 3
4+
1. 모든 결과룰 순회하면서 시간복잡도 O(n^2)을 시도 -> LeetCode에서 Time Limit Exceed 발생
5+
2. 리스트 양쪽 끝에서 포인터를 이동하는 알고리즘: 시간/공간 모두 O(n)
6+
3. (2)의 로직은 유지한 채로 코드 가독성을 개선(알고리즘의 흐름을 쉽게 이해할 수 있도록)
7+
"""
8+
9+
110
class Solution:
211
def maxArea(self, height: list[int]) -> int:
312
left, right = 0, len(height) - 1

0 commit comments

Comments
 (0)