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 c3c8ad0 commit c82d6b3Copy full SHA for c82d6b3
strings/palindrome.py
@@ -62,7 +62,7 @@ def is_palindrome_recursive(s: str) -> bool:
62
>>> all(is_palindrome_recursive(key) is value for key, value in test_data.items())
63
True
64
"""
65
- if len(s) <= 2:
+ if len(s) <= 1:
66
return True
67
if s[0] == s[len(s) - 1]:
68
return is_palindrome_recursive(s[1:-1])
0 commit comments