Minimum Score Triangulation of Polygon similar to matrix chain multiplication problem
\nclass Solution {\npublic:\n    int f(int i,int j,vector<int>& values,vector<vector<int>>&dp)\n    {\n        if(i==j) return 0;\n        int mini=1e9;\n      
```\nclass Solution {\npublic:\n    int f(int i,int j,vector<int>& values,vector<vector<int>>&dp)\n    {\n        if(i==j) return 0;\n        int mini=1e9;\n        if(dp[i][j]!=-1) return dp[i][j];\n        \n        for(int k=i;k<j;k++)\n        {\n          int steps=values[i-1]*values[k]*values[j]+f(i,k,values,dp)+f(k+1,j,values,dp);\n          mini=min(mini,steps);  \n        }\n        return dp[i][j]=mini;\n    }\n    int minScoreTriangulation(vector<int>& values) {\n       int n=values.size();\n        vector<vector<int>>dp(n,vector<int>(n,-1));\n        return f(1,n-1,values,dp);\n    }\n};\n```
['Dynamic Programming', 'C']