Palindrome after one deletion
Easystringtwo pointersgreedy
Return true if s is a palindrome, or becomes one after deleting at most one letter.
Example 1
Input: s = "aba" Output: true
Example 2
Input: s = "abca" Output: true
Delete the c.
Example 3
Input: s = "abc" Output: false
Constraints
- 1 ≤ s.length ≤ 10⁵
- Lowercase letters
Submit checks your solution against 11 tests, including hidden ones.
/**
* @param {string} s
* @return {bool}
*/
function validPalindrome(s) {
}