public static boolean validPalindrome(String s) {
        if(s == null) {
            return false;
        }

        int left = 0;
        int right = s.length()-1;

        while(left < right) {
            while(left < right && !Character.isLetterOrDigit(left)){
                left ++;
            }

            while(left < right && !Character.isLetterOrDigit(right)){
                right --;
            }

            if(left < right && s.charAt(left) != s.charAt(right)) {
                return false;
            }
        }

        return true;
    }