c++ memoization solution (easiest)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int dp[510][510];\n    int mininsertions(string&s, int si, int ei){\n        if(dp[si][ei]!=-1)return dp[si][ei];\n        if(si>=ei)return 0;\n        if(s[si]==s[ei]){\n            return dp[si][ei]=mininsertions(s,si+1,ei-1);\n        }\n        return dp[si][ei]=1+min(mininsertions(s,si+1,ei),mininsertions(s,si,ei-1));\n    }\n    int minInsertions(string s) {\n        memset(dp,-1,sizeof(dp));\n        return mininsertions(s,0,s.size()-1);\n    }\n};\n```
['String', 'Recursion', 'Memoization', 'C++']