Memorization Solution || C++ || Easy to Understand
\n\nclass Solution {\npublic:\n    int dp[102][102];\n\t\n\t// to give count of minimal changes to make this string from i to j palindrome\n    int palindrome(s
\n```\nclass Solution {\npublic:\n    int dp[102][102];\n\t\n\t// to give count of minimal changes to make this string from i to j palindrome\n    int palindrome(string &s, int i, int j){\n        int cnt = 0;\n        while(i<j){\n\t\t\n\t\t\t// if not same, changing one character will work\n            if(s[i]!=s[j]) cnt++;\n            i++, j--;\n        }\n        return cnt;\n    }\n    int solve(int i, string &s, int k){\n\t\n\t\t// if i reaches end and k equals zero then return 0 (Indicates that task done) else return big number to indicate task not done here, 1e3 (1000) because maximum changes is 100\n        if(i==s.length()){\n            if(k==0) return 0;\n            else 1e3;\n        }\n\t\t\n\t\t// at any point k equals zero then task not done\n        if(k==0) return 1e3;\n        \n\t\t// find if at position i with k div possible available for not.\n        if(dp[i][k]!=-1) return dp[i][k];\n        \n\t\t\n        int minChanges = 1e3;\n        for(int cut = i+1; cut<=s.length(); cut++){\n            int changes = palindrome(s, i, cut-1);\n            // taking minimum of all combination\n\t\t\tminChanges = min(minChanges, changes + solve(cut, s, k-1));\n        }\n        return dp[i][k] = minChanges;\n    }\n    int palindromePartition(string s, int k) {\n        memset(dp, -1, sizeof dp);\n        return solve(0, s, k);\n    }\n};\n```\n* Time Complexity - O(n^4)\n* Space O(n^2)
['Dynamic Programming', 'Recursion', 'Memoization', 'C']