[LeetCode] 680. Valid Palindrome II
"abca" True You could delete the character 'c'.
Two pointers. One starts from the beginning and one from the end. Use a flag to check if a character has been deleted. If there's a character difference and no deletion has happened yet, set the flag to true and call recursively.
Time complexity: O(n).