Skip to content

Commit 21fbaf4

Browse files
committed
D. J.:
- Added documentation for the leetcode problem 125 Valid Palindrome
1 parent 8090375 commit 21fbaf4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

awesome_python_leetcode/_125_valid_palindrome.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
class Solution:
22
def isPalindrome(self, s: str) -> bool:
3+
"""
4+
A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and
5+
removing all non-alphanumeric characters, it reads the same forward and backward.
6+
Alphanumeric characters include letters and numbers.
7+
8+
Given a string s, return true if it is a palindrome, or false otherwise.
9+
"""
310
s = s.lower()
411
left, right = 0, len(s) - 1
512
while left < right:

0 commit comments

Comments
 (0)