Problem
Given a string s, return true if it can become a palindrome after deleting at most one character. A palindrome reads the same forwards and backwards.
Example 1
- Input
- s = "aba"
- Output
- true
- Why
- already a palindrome
Example 2
- Input
- s = "abca"
- Output
- true
- Why
- delete "c" or "b"
Example 3
- Input
- s = "abc"
- Output
- false
Constraints
1 <= s.length <= 10^5s consists of lowercase English letters.