We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0876a87 commit 33036feCopy full SHA for 33036fe
strings/palindrome.py
@@ -61,7 +61,7 @@ def is_palindrome_recursive(s: str) -> bool:
61
>>> all(is_palindrome_recursive(key) is value for key, value in test_data.items())
62
True
63
"""
64
- if len(s) <= 2:
+ if len(s) <= 1:
65
return True
66
if s[0] == s[len(s) - 1]:
67
return is_palindrome_recursive(s[1:-1])
0 commit comments