public static boolean isRotatedPalindromeDP(String input) {
        String augmentedInput = input + input;
        boolean[][] length = new boolean[augmentedInput.length()+1][augmentedInput.length()+1];
        int maxLength = input.length();
        //setting up base case  .. all single letter palindromes
        for( int i=0; i< augmentedInput.length(); i++) {
            length[i][i] = true;
        }

         //all double letter palindromes
        for( int i=1; i< augmentedInput.length(); i++) {
            if(augmentedInput.charAt(i) == augmentedInput.charAt(i-1)){
                length[i-1][i] = true;
                if(maxLength ==2) {
                    return true;
                }
            }
        }

        //for all palindrome with length 3 or above
        for( int j=3 ;j <=maxLength; j++) {
            for( int i =0; i<augmentedInput.length()-j+1; i++) {
                int k = i+j-1;
                if(augmentedInput.charAt(i) == augmentedInput.charAt(k) && length[i+1][k-1]) {
                    length[i][k] = length[i+1][k-1];
                    if(j == maxLength){
                        return true;
                    }
                }

            }
        }

        return false;

    }