Valid Palindrome II

String Simulation/Two Pointer

Problem

Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome.

For example:

Input: "aba"
Output: True
Input: "abca"
Output: True
Explanation: You could delete the character 'c'.

Thought Process

Solution

Last updated

Was this helpful?