MATRIX CHAIN MULTIPLICATION😉
given array nums = {3,1,5,8}\n Since bursting any baloon at any index ,say 1 : 3X1X5 is similar to matrix multiplication 3X1 and 1X5 \n therefore, we can think 
given array nums = {3,1,5,8}\n* Since bursting any baloon at any index ,say 1 : 3X1X5 is similar to matrix multiplication 3X1 and 1X5 \n* therefore, we can think of this problem as **MAXIMIZING** the operations in matrix chain multiplication\n* Expand nums array by adding 1 at begining and end as bursting first and last baloon is similar to multiplication 1Xcurrent valueXnext value or prev valueXcurrent valueX1\nThink of it as  nums = {**1**,3,1,5,8,**1**}\n//n is the size of nums\n* Now algo :\n1. expand nums : by adding 1 at start and end\n2. set dp[i][i] = 0    //*where dp[i][j] means max profit obtained by bursting baloons from i to j*\n3. for len = 2 to n-1 :\n\t\t for i=1 to n-2 :\n\t\t\t j = i - len + 1\n\t\t\t dp[i][j] = -INFINITY\n\t\t\t for k = i to j-1 :\n\t\t\t\t dp[i][j] = max(dp[i][j], dp[i][k] + dp[k+1][j] + nums[i-1][k][j])\n4. return dp[1][n-1]
[]