Simple C++ Solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int solve(vector<int>& values,int i,int j,vector<vector<int>> &dp){\n        if(i+1==j){\n            return 0;\n        }\n        if(dp[i][j]!=-1){\n            return dp[i][j];\n        }\n        int ans = INT_MAX;\n        for(int k=i+1;k<j;k++){\n            ans=min(ans,values[i]*values[j]*values[k]+solve(values,i,k,dp)+ solve(values,k,j,dp));\n        }\n        dp[i][j]=ans;\n        return dp[i][j];\n    }\n    int minScoreTriangulation(vector<int>& values) {\n        int n=values.size();\n        vector<vector<int>> dp(n,vector<int>(n,-1));\n        return solve(values,0,n-1,dp);\n    }\n};\n```
['C++']