[Java] Simple Recursion & Memoization
```\nclass Solution {\n    \n    public static int change(String s, int start, int end){\n        \n        int count = 0;\n        while(start < end){\n       
```\nclass Solution {\n    \n    public static int change(String s, int start, int end){\n        \n        int count = 0;\n        while(start < end){\n            if(s.charAt(start) != s.charAt(end)) count ++;\n            start ++;\n            end --;\n        }\n        \n        return count;\n        \n    }\n    \n    public static int divide(String s, int k, int start, int end, int[][][] dp){\n        \n        if(dp[start][end][k] != -1) return dp[start][end][k];\n        \n        if(k == 1) return dp[start][end][k] = change(s, start, end);\n        \n        if(start == end){\n            if(k <= 1) return dp[start][end][k] = k;\n            return dp[start][end][k] = Integer.MAX_VALUE;\n        }\n        \n        int min = Integer.MAX_VALUE;\n        \n        for(int i = start; i < end; i++){\n            int x1 = divide(s, 1, start, i, dp);\n            int x2 = divide(s, k - 1, i + 1, end, dp);\n            if(x1 != Integer.MAX_VALUE && x2 != Integer.MAX_VALUE) min = Math.min(x1 + x2, min);\n        }\n        \n        return dp[start][end][k] = min;\n        \n    }\n    \n    public int palindromePartition(String s, int k) {\n        \n        int n = s.length();\n        int[][][] dp = new int[n][n][k + 1];\n        \n        for(int i = 0; i < n; i++){\n            for(int j = 0; j < n; j++){\n                for(int p = 0; p < k + 1; p++) dp[i][j][p] = -1;\n            }\n        }\n        \n        return divide(s, k, 0, n - 1, dp);\n        \n    }\n}
['Dynamic Programming', 'Recursion', 'Memoization']