LeetCode/string/ValidPalindromeII.java
// check if a char sequence is palindrome
check if a char sequence is palindrome
check if a char sequence is palindrome
public boolean isPalindrome(CharSequence s) {
        for (int i = 0; i < s.length() / 2; i++) {
            if (s.charAt(i) != s.charAt(s.length() - i - 1)) {
                return false;
            }
        }
        return true;
    }
public boolean isPalindrome ( CharSequence s ) { for ( int i = 0 ; i < s . length ( ) / 2 ; i ++ ) { if ( s . charAt ( i ) != s . charAt ( s . length ( ) - i - 1 ) ) { return false ; } } return true ; }
check if a char sequence is palindrome
check if a char sequence is palindrome