Valid Palindrome II

Problem

Given a string s, return true if it can become a palindrome after deleting at most one character.

Input / Output

  • Input: a string s of lowercase English letters.
  • Output: boolean — true if s is a palindrome after deleting at most one character.

Constraints

  • 1 ≤ s.length ≤ 10^5
  • Lowercase English letters

Example

s = "abca"
Output: true  // delete 'c'
added …
LeaderboardSalaryAccount