We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Strings
- Palindrome Index
- Discussions
Palindrome Index
Palindrome Index
Sort by
recency
|
1097 Discussions
|
Please Login in order to post a comment
the solution is: def ispalindromes(s): return s==s[::-1]
def palindromeIndex(s): n=len(s) if ispalindromes(s): return -1
My Python solution doesn't pass many of the testcases! Can anyone help?
My python solution:
Here is my c++ solution : explanation here https://youtu.be/QjHpvMdfnqs,
Here is my solution in PHP
s); arr); arr); res);