Just for whom looking for a C# solution
\n\npublic class Solution {\n    public string ShortestSuperstring(string[] A) {\n        int n = A.Length;\n        int[,] graph = new int[n, n];\n        \n  
```\n\npublic class Solution {\n    public string ShortestSuperstring(string[] A) {\n        int n = A.Length;\n        int[,] graph = new int[n, n];\n        \n        // build the graph\n        for (int i = 0; i < n; i++) {\n            for (int j = 0; j < n; j++) {\n                graph[i, j] = calc(A[i], A[j]);\n                graph[j, i] = calc(A[j], A[i]);\n            }\n        }\n        \n        int[,] dp = new int[1 << n, n];\n        int[,] path = new int[1 << n, n];\n        int last = -1, min = int.MaxValue;\n\t\t\n        // start TSP DP\n        for (int i = 1; i < (1 << n); i++) {\n            for (int j = 0; j < n; j++) {\n                dp[i, j] = int.MaxValue;\n                if ((i & (1 << j)) > 0) {\n                    int prev = i - (1 << j);\n                    if (prev == 0) {\n                        dp[i, j] = A[j].Length;\n                    } else {\n                        for (int k = 0; k < n; k++) {\n                            if (dp[prev, k] < int.MaxValue && dp[prev, k] + graph[k, j] < dp[i, j]) {\n                                dp[i, j] = dp[prev, k] + graph[k, j];\n                                path[i, j] = k;\n                            }\n                        }\n                    }\n                }\n                if (i == (1 << n) - 1 && dp[i, j] < min) {\n                    min = dp[i, j];\n                    last = j;\n                }\n            }\n        }\n        \n        // build the path\n        StringBuilder sb = new StringBuilder();\n        int cur = (1 << n) - 1;\n        var stack = new Stack<int>();\n        while (cur > 0) {\n            stack.Push(last);\n            int temp = cur;\n            cur -= (1 << last);\n            last = path[temp, last];\n        }\n\t\t\n        // build the result\n        int l = stack.Pop();\n        sb.Append(A[l]);\n        while (stack.Any()) {\n            int j = stack.Pop();\n            sb.Append(A[j].Substring(A[j].Length - graph[l, j]));\n            l = j;\n        }\n        \n        return sb.ToString();\n    }\n    \n    private int calc(string a, string b) {\n        for (int i = 1; i < a.Length; i++) {\n            if (b.StartsWith(a.Substring(i))) {\n                return b.Length - a.Length + i;\n            }\n        }\n        return b.Length;\n    }\n}\n\n```
[]