Python3 short straight forward DP
\nimport functools\nclass Solution:\n    def minInsertions(self, s: str) -> int:\n        @functools.lru_cache(None)\n        def dp(i, j):\n            if j - 
```\nimport functools\nclass Solution:\n    def minInsertions(self, s: str) -> int:\n        @functools.lru_cache(None)\n        def dp(i, j):\n            if j - i <= 1: return 0\n            return dp(i + 1, j - 1) if s[i] == s[j - 1] else min(dp(i + 1, j), dp(i, j - 1)) + 1\n        return dp(0, len(s))\n```
[]