C++ simple memoization
\nclass Solution {\npublic:\n    int minimum_area(vector<int> &A,int si,int ei,vector<vector<int>>&dp){\n        if(si+1==ei) return 0;\n        \n        if(dp
```\nclass Solution {\npublic:\n    int minimum_area(vector<int> &A,int si,int ei,vector<vector<int>>&dp){\n        if(si+1==ei) return 0;\n        \n        if(dp[si][ei]!=0) return dp[si][ei];\n        \n        int ans=INT_MAX;\n        for(int cut=si+1;cut<ei;cut++){\n            \n            int leftAns=minimum_area(A,si,cut,dp);\n            int rightAns=minimum_area(A,cut,ei,dp);\n            \n            int myAns=leftAns+(A[si]*A[cut]*A[ei])+rightAns;\n            \n            ans=min(ans,myAns);\n        }\n        \n        return dp[si][ei]=ans;\n    }\n    int minScoreTriangulation(vector<int>& A) {\n        int n=A.size();\n        vector<vector<int>>dp(n,vector<int>(n,0));\n        return minimum_area(A,0,n-1,dp);\n    }\n    \n};\n```
['Dynamic Programming', 'Memoization', 'C', 'C++']