Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome.
Example
No.1
Input: “aba”
Output: True
No.2
Input: “abca”
Output: True
Explanation: You could delete the character ‘c’.
Note
- The string will only contain lowercase characters a-z. The maximum length of the string is 50000.
Code
1 | public boolean validPalindrome(String s) { |