Matrix Chain Multiplication || DP || Memoization
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:\nO(N^3)\n\n- Space complexity:\nO(N*N)+O(N)\n\n# Code\n```\nclass Solution {\npublic:\nint fun(int i,int j,vector<int>& arr, vector<vector<int>> &dp){\n        if(i==j) return 0;\n    int mini=1e9;\n    if(dp[i][j]!=-1) return dp[i][j];\n    for(int k=i;k<j;k++){\n    int steps=arr[i-1]*arr[k]*arr[j]+fun(i,k,arr,dp)+fun(k+1,j,arr,dp);\n        mini=min(mini,steps);\n    }\n    return dp[i][j]=mini;\n}\n    int minScoreTriangulation(vector<int>& arr) {\n        int n=arr.size();\n             vector<vector<int>> dp(n,vector<int>(n,-1));\n   return fun(1,n-1,arr,dp);\n    }\n};\n```
['Dynamic Programming', 'Memoization', 'C++']