4 ms C++ solution beats 100% of all submissions, top down approach
\nint dp[55][55];\nint minScore(vector<int>& A,int n,int i,int j){\n    \n    if(dp[i][j] != -1)  return dp[i][j];\n    if(j == 0)  j = n-1;\n    int res = INT_
```\nint dp[55][55];\nint minScore(vector<int>& A,int n,int i,int j){\n    \n    if(dp[i][j] != -1)  return dp[i][j];\n    if(j == 0)  j = n-1;\n    int res = INT_MAX;\n    bool loopRun = false;\n    for(int k=i+1;k<j;k++){\n        loopRun = true;\n        int  temp = (A[i]*A[j]*A[k]) + minScore(A,n,i,k) + minScore(A,n,k,j);\n        if(res > temp)  res = temp;\n    }\n    if(!loopRun)    return dp[i][j] = 0;\n    return dp[i][j] = res;\n}\n\nclass Solution {\npublic:\n    int minScoreTriangulation(vector<int>& A) {\n        int n = A.size();\n        for(int i=0;i<=n;i++){\n            for(int j=0;j<=n;j++){\n                dp[i][j] = -1;\n            }\n        }\n        return minScore(A,n,0,0);\n        \n    }\n};\n```\n\nPlease upvote if it helps!!
['Dynamic Programming', 'Memoization', 'C']