Delete matching characters from both ends (same char prefix from left, suffix from right). Minimize length.
Two pointers: while left < right and chars match, delete all matching chars on both sides.
- left=0, right=n-1
- While left < right and s[left]==s[right]
- Advance left past all s[left] chars
- Advance right back past all s[right] chars
- Return max(0, right-left+1)
- Time Complexity: O(n)
- Space Complexity: O(1)