Approach Summary
Two pointers from both ends. On mismatch, try skipping left or right character and check if the remaining substring is a palindrome.
How to Recognize This Pattern
- "At most one character deletion"
- Two pointers + one greedy skip on first mismatch
Complexity Analysis
Time Complexity
O(n)
Space Complexity
O(1)
Tags
String Greedy Two Pointers