일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Regular Expression
- concurrency
- 운영체제
- Python Implementation
- data science
- shiba
- 시바견
- Protocol
- Decorator
- Python
- 715. Range Module
- DWG
- 컴퓨터의 구조
- 43. Multiply Strings
- Convert Sorted List to Binary Search Tree
- LeetCode
- 밴픽
- 30. Substring with Concatenation of All Words
- Python Code
- Class
- 프로그래머스
- Generator
- 109. Convert Sorted List to Binary Search Tree
- Substring with Concatenation of All Words
- iterator
- 315. Count of Smaller Numbers After Self
- kaggle
- attribute
- 파이썬
- t1
Archives
- Today
- Total
목록Valid Palindrome (1)
Scribbling
LeetCode: 125. Valid Palindrome
class Solution: def isPalindrome(self, s: str) -> bool: s = s.lower().strip() if not s: return True l, r = 0, len(s) - 1 while l < r: if not s[l].isalnum(): l += 1 continue if not s[r].isalnum(): r -= 1 continue if s[l] != s[r]: return False l += 1 r -= 1 return True
Computer Science/Coding Test
2021. 12. 20. 12:35