목록leetcode (1)
go.od_planter
[leetcood] 125. Valid Palindrome
class Solution: def isPalindrome(self, s: str) -> bool: # First way strs = [] for char in s: if char.isalnum(): strs.append(char.lower()) # Is Palindrome? while len(strs) > 1: if strs.pop(0) != strs.pop(): return False return True#######################################################..
코딩테스트/Python
2024. 10. 11. 16:34