A slow but easy to understand Python solution
\nfrom functools import lru_cache\nfrom typing import *\n\nclass Solution:\n    def shortestSuperstring(self, strings: List[str]) -> str:\n        """\n        
```\nfrom functools import lru_cache\nfrom typing import *\n\nclass Solution:\n    def shortestSuperstring(self, strings: List[str]) -> str:\n        """\n        Dynamic programming\n        \n        Reduce the problem of find the best concatenation for [1, 2, 3] to:\n        - Choose 1 and recurse on [2, 3], and put 1 at the start or at the end of this sub-solution\n        - Choose 2 and recurse on [1, 3], and put 2 at the start or at the end of this sub-solution\n        - Etc\n        """\n        \n        def concat(s1, s2):\n            l = min(len(s1), len(s2))\n            for i in reversed(range(1, l+1)):\n                if s1.endswith(s2[:i]):\n                    return s1 + s2[i:]\n            return s1 + s2\n        \n        @lru_cache(maxsize=None)\n        def visit(visited):     \n            best_score = float(\'inf\')\n            best_suffix = ""\n            \n            for i, s in enumerate(strings):\n                if not (1 << i) & visited:    \n                    sub_suffix = visit((1 << i) | visited)\n                    \n                    suffix = concat(s, sub_suffix)\n                    if len(suffix) < best_score:\n                        best_score = len(suffix)\n                        best_suffix = suffix\n                    \n                    suffix = concat(sub_suffix, s)\n                    if len(suffix) < best_score:\n                        best_score = len(suffix)\n                        best_suffix = suffix\n            \n            return best_suffix\n            \n        best_solution = visit(0)\n        return best_solution\n```
[]