# 680. Valid Palindrome II

#### Easy

***

Given a string `s`, return `true` *if the* `s` *can be palindrome after deleting **at most one** character from it*.

&#x20;

**Example 1:**

```
Input: s = "aba"
Output: true
```

**Example 2:**

```
Input: s = "abca"
Output: true
Explanation: You could delete the character 'c'.
```

**Example 3:**

```
Input: s = "abc"
Output: false
```

&#x20;

**Constraints:**

* `1 <= s.length <= 105`
* `s` consists of lowercase English letters.

```python
class Solution:
    def validPalindrome(self, s: str) -> bool:
        left = 0
        right = len(s) - 1
        count = 1 # Number of deletes
        return self.check_palindrome(s, left, right, count)
        
    def check_palindrome(self, string, left, right, count):
        while left < right:
            if string[left] != string[right]:
                if count <= 0 :
                    return False
                return self.check_palindrome(string, left+1, right, count-1) or self.check_palindrome(string, left, right-1, count-1)
            left += 1
            right -= 1
        return True
        
```
