C++ ,easy recursion
```\nclass Solution {\nprivate:\n    vector> dp;\n    int value(string& s){\n        int i = 0, j = s.length()-1;\n        int ans = 0;\n        while(i<j){\n  
```\nclass Solution {\nprivate:\n    vector<vector<int>> dp;\n    int value(string& s){\n        int i = 0, j = s.length()-1;\n        int ans = 0;\n        while(i<j){\n            if(s[i]!=s[j])\n                ans++;\n            i++,j--;\n        }\n        return ans;\n    }\n    \n    int solve(int i, string& s, int limit) {\n        if(limit == 0 && i < s.length())\n            return INT_MAX;\n        if(i == s.length() && limit != 0)\n            return INT_MAX;\n       if(i == s.length() && limit == 0)\n            return 0;\n        if(dp[i][limit]!=-1)\n            return dp[i][limit];\n        string temp = "";\n        int mini = INT_MAX;\n        for(int j = i ; j < s.length() ; j++){\n            temp+=s[j];\n            int x = value(temp);\n            int y = solve(j+1,s,limit-1);\n            if(y!=INT_MAX)\n                mini = min(mini,x+y);\n        }\n        return dp[i][limit] = mini;\n    } \npublic:\n    int palindromePartition(string s, int k) {\n        dp.resize(s.length(),vector<int>(k+1,-1));\n        return solve(0,s,k);\n    }\n};
['Recursion', 'Memoization', 'C']