Matrix Chain Multiplication | Tabulation
Same as Matrix Chain Multiplication \n\nclass Solution {\npublic:\n// Time Complexity -> O(N^3) \n// Space Complexity -> O(N^2)\n    int minScoreTriangulation(v
# ***Same as Matrix Chain Multiplication*** \n```\nclass Solution {\npublic:\n// Time Complexity -> O(N^3) \n// Space Complexity -> O(N^2)\n    int minScoreTriangulation(vector<int>& arr) {\n        int n=arr.size();\n        \n        vector<vector<int>> dp(n, vector<int>(n,0));\n        \n        for(int i=n-2;i>=1;i--){\n            for(int j=i+1;j<n;j++){\n                dp[i][j]=INT_MAX;\n                for(int k=i;k<j;k++){\n                    dp[i][j] = min(dp[i][j],arr[i-1]*arr[k]*arr[j] + dp[i][k] + dp[k+1][j]);\n                }\n            }\n        }\n        return dp[1][n-1];\n    }\n};\n```
['Dynamic Programming']