<awangdev>680. Valid Palindrome II_1.java
public boolean validate(String s, int start, int end, boolean state) {
        if (start > end) return false;
        while (start < end) {
            if (s.charAt(start) == s.charAt(end)) {
                start++;
                end--;
                continue;
            } else if (state) {
                return validate(s, start + 1, end, false) || validate(s, start, end - 1, false);
            }
            return false;
        }
        return true;
    }
public boolean sample_funcname ( String s , int start , int end , boolean state ) {
  if ( start > end ) return false ;
  while ( start < end ) {
    if ( s . charAt ( start ) == s . charAt ( end ) ) {
      start ++ ;
      end -- ;
      continue ;
    }
    else if ( state ) {
      return validate ( s , start + 1 , end , false ) || validate ( s , start , end - 1 , false ) ;
    }
    return false ;
  }
  return true ;
}
