Same as Matrix Chain Multiplication || Standard Problem || Memoized Code
class Solution {\npublic:\n    \n    int t[101][101];\n    \n    int solve(vector& arr, int i, int j)\n    {\n        //memoized code\n        if(i>=j)\n       
class Solution {\npublic:\n    \n    int t[101][101];\n    \n    int solve(vector<int>& arr, int i, int j)\n    {\n        //memoized code\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        {\n            int temp= solve(arr, i, k) + solve(arr, k+1, j) + \n                arr[i-1]*arr[k]*arr[j];\n            \n            if(temp<mn)\n            t[i][j]=mn= min(mn, temp);\n        }\n        \n        return t[i][j];\n    }\n    \n    \n    int minScoreTriangulation(vector<int>& values) {\n        \n        memset(t,-1,sizeof(t));\n        int i=1; \n        int j=values.size()-1;\n        return solve(values, i, j);\n    }\n};
['Dynamic Programming', 'C']