Simple solution using recursion+memoization
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 {\n\n  //  min no.of insertions = total length- longest palindromic subsequence \n\n    public int minInsertions(String s) {\n       \n       Integer dp[][]=new Integer[s.length()][s.length()]; //memo\n\n       return s.length() - lps(s,rev(s),s.length()-1,s.length()-1,dp);\n\n    }\n    int lps(String s1,String s2,int i,int j,Integer dp[][]){\n\n         if(i<0 || j<0)return 0; //base\n\n         if(dp[i][j]!=null)return dp[i][j];\n\n         if(s1.charAt(i)==s2.charAt(j)){         //if both characters of string and reversed string matches moe both pointers\n             return dp[i][j]=1+lps(s1,s2,i-1,j-1,dp);\n         }else{\n             return dp[i][j]=Math.max(lps(s1,s2,i-1,j,dp),lps(s1,s2,i,j-1,dp)); //else check moving one pointer at a time \n         }\n    }\n    String rev(String s){\n        StringBuilder sb=new StringBuilder(s);\n        sb.reverse();\n        return sb.toString();\n    }\n\n}\n```
['Recursion', 'Memoization', 'Java']