@@ -0,0 +1,1042 @@
+/***%0A * Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.%0A *%0A * For example,%0A * %22A man, a plan, a canal: Panama%22 is a palindrome.%0A * %22race a car%22 is not a palindrome.%0A *%0A * Note:%0A * Have you consider that the string might be empty? This is a good question to ask during an interview.%0A *%0A * For the purpose of this problem, we define empty string as valid palindrome.%0A */%0Apublic class Solution %7B%0A    public boolean isPalindrome(String s) %7B%0A        s = s.toUpperCase();%0A        int i = 0;%0A        int j = s.length() - 1;%0A        while(i %3C j) %7B%0A            if (!isAlphabet(s.charAt(i)))%0A                i++;%0A            else if (!isAlphabet(s.charAt(j)))%0A                j--;%0A            else if (s.charAt(i) != s.charAt(j)) %7B%0A                return false;%0A            %7Delse %7B%0A                i++;%0A                j--;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%0A    private boolean isAlphabet(char c) %7B%0A        return (c %3E= 'A' && c %3C= 'Z') %7C%7C (c %3E= '0' && c %3C= '9');%0A    %7D%0A%7D%0A

add ValidPalindrome.java