18: Valid palindrome
Given a string
, write a method to check if it possible to create a valid palindrome
. The method can remove at most
one character
Example 1
Input: aga
Output: true
Example 2
Input: agta
Output: true
Explanation:
t
can be removed
Helpful article