Skip to content

Commit 365c1cc

Browse files
committed
Update description and conditions for Valid Palindrome problem
1 parent 6344174 commit 365c1cc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

valid-palindrome/KwonNayeon.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""
2-
Title: 215. Valid Palindrome
2+
Title: 215. Valid Palindrome
33
Link: https://leetcode.com/problems/valid-palindrome/
44
55
Summary:
66
- Palindrome이라면 True, 아니라면 False를 반환하는 문제.
7-
- Palindrome이란, 대문자를 소문자로 변환하고 알파벳과 숫자 이외의 문자를 제거한 후에도
8-
앞으로 읽어도 뒤에서부터 읽어도 동일한 단어를 뜻함.
7+
- Palindrome이란, 앞으로 읽어도 뒤에서부터 읽어도 동일한 단어를 뜻함.
8+
- 추가 조건: 대소문자를 구분하지 않으며, 알파벳과 숫자 이외의 문자는 제거해야 함.
99
- e.g. racecar
1010
1111
Conditions:
@@ -15,7 +15,6 @@
1515
Time Complexity:
1616
- O(n)
1717
"""
18-
1918
class Solution:
2019
def isPalindrome(self, s: str) -> bool:
2120
s = re.sub(r'[^a-zA-z]', '', s).lower()

0 commit comments

Comments
 (0)