```javascript
/**
 * @param {string} s
 * @return {boolean}
 *
 * Maximum length is 50000
 * s is not empty
 * s only contains a-z
 */
var validPalindrome = function(s) {
  return validHelper(s, 0, s.length - 1, 0);
};

var validHelper = function(s, startIndex, endIndex, deleteCount) {
  let left = startIndex,
    right = endIndex,
    lc, rc;

  while (left < right) {
    lc = s[left], rc = s[right];
    if (lc === rc) {
      left++;
      right--;
    } else {
      if (deleteCount > 0) {
        return false;
      } else {
        // we got two choices, (1) delete left character, (2) delete right charecter
        return validHelper(s, left + 1, right, 1) || validHelper(s, left, right - 1, 1);
      }
    }
  }

  return true;
};
```