(self, s: str)
| 1 | class Solution: |
| 2 | def validPalindrome(self, s: str) -> bool: |
| 3 | i, j = 0, len(s) - 1 |
| 4 | |
| 5 | while i < j: |
| 6 | if s[i] == s[j]: |
| 7 | i += 1 |
| 8 | j -= 1 |
| 9 | else: |
| 10 | return self.validPalindromeUtil(s, i + 1, j) or self.validPalindromeUtil(s, i, j - 1) |
| 11 | return True |
| 12 | |
| 13 | def validPalindromeUtil(self, s, i, j): |
| 14 | while i < j: |
nothing calls this directly
no test coverage detected