Skip to content

Commit 477d67d

Browse files
Update 0125-Valid-Palindrome.py
1 parent 0fa8a0b commit 477d67d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

0125-Valid-Palindrome.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
Input: "race a car"
1414
Output: false
1515
'''
16+
# Time Complexity: O(n)
17+
# Space Complexity: O(1)
1618
class Solution:
1719
def isPalindrome(self, s: str) -> bool:
1820
first, last = 0, len(s) - 1

0 commit comments

Comments
 (0)