Matrix chain multiplication

https://ide.geeksforgeeks.org/LuBeXbNMGQ
please help

@arsh_goyal hey ,let me correct your code.

1 Like

Hi Please correct this

@arsh_goyal please check this,I have made some corrections.

Its wrong answer again

try putting the code here
https://practice.geeksforgeeks.org/problems/matrix-chain-multiplication/0

@arsh_goyal hey the problem was that ,in this qstn you were given test cases and you have declared dp array globally so you have to set dp array again to -1 after each test case,it is accepting now,see to it:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.