public boolean isPalindrome(String s) {
        if (s == null || s.isEmpty()) return true;
        int left = 0, right = s.length() - 1;
        while (left < right) {
            if (!isLetterOrNum(s.charAt(left))) ++left;
            else if (!isLetterOrNum(s.charAt(right))) --right;
            else if (!equalIgnoreCase(s.charAt(left++), s.charAt(right--))) return false;
        }
        return true;
    }