Skip to content

Commit be77a6a

Browse files
committed
Plan to add solution approach and TC/SC explanation for "Valid Palindrome"
1 parent 7e1db34 commit be77a6a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

valid-palindrome/KwonNayeon.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
66
<Solution 1>
77
Time Complexity: O(n)
8+
-
89
910
Space Complexity: O(n)
11+
-
12+
13+
풀이 방법:
14+
-
1015
"""
1116
class Solution:
1217
def isPalindrome(self, s: str) -> bool:
@@ -17,10 +22,13 @@ def isPalindrome(self, s: str) -> bool:
1722
"""
1823
<Solution 2>
1924
Time Complexity: O(n)
20-
- 팰린드롬일 경우, 각 문자를 한 번씩 검사
25+
- 팰린드롬일 경우, 각 문자를 한 번씩 검사함
2126
2227
Space Complexity: O(1)
2328
- left, right 포인터 외에 추가 공간 사용 없음
29+
30+
풀이 방법:
31+
-
2432
"""
2533
class Solution:
2634
def isPalindrome(self, s: str) -> bool:

0 commit comments

Comments
 (0)