Valid Palindrome II
Given a non-empty strings, you may deleteat mostone character. Judge whether you can make it a palindrome.
Example
Example 1:
Input:
"aba"
Output:
TrueExample 2:
Input:
"abca"
Output:
True
Explanation:
You could delete the character 'c'.Note
在不一致的情况下,删左边或者删右边,继续判断
Code
Last updated