c++ simple solution , matrix chain multiplication
\nclass Solution {\npublic:\n    int t[51][51];\n    int solve(vector<int> & arr , int i , int j){\n        if(i>=j){\n            return 0;\n        }\n       
```\nclass Solution {\npublic:\n    int t[51][51];\n    int solve(vector<int> & arr , int i , int j){\n        if(i>=j){\n            return 0;\n        }\n        if(t[i][j]!=-1){\n            return t[i][j];\n        }\n        int mn = INT_MAX;\n        for(int k = i ; k<j ; k++){\n            int temp = solve(arr , i , k)+solve(arr ,k+1 , j) + arr[i-1]*arr[k]*arr[j];\n            mn = min(mn , temp);\n        }\n        \n        return t[i][j] = mn;\n    }\n    int minScoreTriangulation(vector<int>& arr) {\n        memset(t , -1 ,sizeof(t));\n        int ans = solve(arr , 1 , arr.size()-1);\n        return ans;\n    }\n};\n```
['Dynamic Programming']