Simple approach (C++) Solution
\nclass Solution {\npublic:\n    string shortestSuperstring(vector<string>& A) {\n        int n=A.size(),m=0,i,j,k,o,a[12][12],l[12],p[12],f[4096][12];\n       
```\nclass Solution {\npublic:\n    string shortestSuperstring(vector<string>& A) {\n        int n=A.size(),m=0,i,j,k,o,a[12][12],l[12],p[12],f[4096][12];\n        for(i=0;i<n;i++)l[i]=A[i].size();\n        memset(f,0,sizeof(f));\n        for(i=0;i<n;i++)for(j=0;j<n;j++)if(i!=j)for(a[i][j]=0,k=1;k<l[i]&&k<l[j];k++)\n        {\n            for(o=0;o<k;o++)if(A[i][l[i]-k+o]!=A[j][o])break;\n            if(o==k)a[i][j]=k;\n        }\n        for(i=1;i<1<<n;i++)for(j=0;j<n;j++)if(i>>j&1)for(k=0;k<n;k++)if((i>>k&1)&&j!=k)f[i][j]=max(f[i][j],f[i^(1<<j)][k]+a[k][j]);\n        for(i=j=0;i<n;i++)if(f[(1<<n)-1][i]>f[(1<<n)-1][j])j=i;\n        for(i=(1<<n)-1;;)\n        {\n            p[m++]=j;\n            if(i==(1<<j))break;\n            for(k=0;k<n;k++)if((i>>k&1)&&j!=k&&f[i][j]==f[i^(1<<j)][k]+a[k][j])break;\n            i^=1<<j;\n            j=k;\n        }\n        reverse(p,p+m);\n        string ans=A[p[0]];\n        for(i=1;i<n;i++)for(j=a[p[i-1]][p[i]];j<l[p[i]];j++)ans+=A[p[i]][j];\n        return ans;\n    }\n};\n```\nAlso the problem is available in [this](https://www.geeksforgeeks.org/shortest-superstring-problem/) GFG post
[]