@@ -0,0 +1,1066 @@
+/*%0A125. Valid Palindrome%0AEasy%0A%0AGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.%0A%0ANote: For the purpose of this problem, we define empty string as valid palindrome.%0A%0AExample 1:%0A%0AInput: %22A man, a plan, a canal: Panama%22%0AOutput: true%0AExample 2:%0A%0AInput: %22race a car%22%0AOutput: false%0A %0A%0AConstraints:%0A%0As consists only of printable ASCII characters.%0A*/%0A%0Aclass Solution %7B%0A    public boolean isPalindrome(String s) %7B%0A        if (s == %22%22) %7B%0A            return true;%0A        %7D%0A        %0A        int i = 0, j = s.length() - 1;%0A        while (i %3C= j) %7B%0A            while (i %3C j && !Character.isLetterOrDigit(s.charAt(i))) %7B%0A                i++;%0A            %7D %0A            %0A            while (i %3C j && !Character.isLetterOrDigit(s.charAt(j))) %7B%0A                j--;%0A            %7D%0A            %0A            if (Character.toLowerCase(s.charAt(i)) != Character.toLowerCase(s.charAt(j))) %7B%0A                return false;%0A            %7D%0A            %0A            i++;%0A            j--;%0A        %7D%0A        %0A        return true;%0A    %7D%0A%7D

add p125