@@ -0,0 +1,1785 @@
+package com.sunny.grokkingalgorithms.refresh.ctci.arraysandstrings;%0A%0Apublic class PermutationPalindromeChecker %7B%0A%0A    /**%0A     * Check when given a string , any of its permutation is a palindrome.%0A     *%0A     * Tact Coa%0A     *%0A     * true%0A     *%0A     * (taco cat,atco cta)%0A     */%0A%0A    public static int effectiveCount(String s)%7B%0A        int count = 0;%0A        for(int i = 0 ; i %3C s.length() ; i++)%7B%0A            if(s.charAt(i) ==  ' ')%7B%0A                continue;%0A            %7D%0A            count++;%0A        %7D%0A        return count;%0A    %7D%0A%0A    /**%0A     *%0A     * @param s%0A     * @return%0A     */%0A    public static boolean isAnyPermutationAPalindrome(String s)%7B%0A        boolean isAnyPermutationPalindrome = false;%0A        char%5B%5D arr = s.toCharArray();%0A        for(int i = 0 ; i %3C s.length() ; i++)%7B%0A            char cur = Character.toLowerCase(s.charAt(i));%0A            if(cur == ' ')%7B%0A                continue;%0A            %7D%0A            for(int j = i+1 ; j %3C s.length() ; j++)%7B%0A                if(cur == Character.toLowerCase(s.charAt(j))) %7B%0A                    arr%5Bi%5D = ' ';%0A                    arr%5Bj%5D = ' ';%0A                    break;%0A                %7D%0A            %7D%0A        %7D%0A        int count = 0;%0A        for(int i = 0 ; i %3C arr.length ; i++)%7B%0A            if(arr%5Bi%5D != ' ')%7B%0A                count++;%0A            %7D%0A        %7D%0A        if(effectiveCount(s)%252 == 0 && count == 0)%7B%0A            isAnyPermutationPalindrome = true;%0A        %7D%0A        else if((effectiveCount(s)%252 != 0) && count == 1)%7B%0A            isAnyPermutationPalindrome = true;%0A        %7D%0A        return isAnyPermutationPalindrome;%0A    %7D%0A%0A    /**%0A     *%0A     * @param args%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        String s = %22Tact Coa%22;%0A        System.out.println(isAnyPermutationAPalindrome(s));%0A    %7D%0A%7D%0A

Is any permutation of a string a palindrome. O(nsquared) slution.