C++ SIMPLE EASY SOLUTION
\nvector<vector<int>> memo;\n    //code explained below ...\n    int dp(string &s,int i,int j)\n    {\n        if(i>=j)\t\t//Base case.\n            return 0;\n
```\nvector<vector<int>> memo;\n    //code explained below ...\n    int dp(string &s,int i,int j)\n    {\n        if(i>=j)\t\t//Base case.\n            return 0;\n        if(memo[i][j]!=-1) //Check if already calculated the value for the pair `i` and `j`.\n            return memo[i][j];\n        return memo[i][j]=s[i]==s[j]?dp(s,i+1,j-1):1+min(dp(s,i+1,j),dp(s,i,j-1));\t\t//Recursion \n    }\n    int minInsertions(string s) \n    {\n        memo.resize(s.length(),vector<int>(s.length(),-1));\n        return dp(s,0,s.length()-1);\n    }\n```
[]