Getting wrong answer

@Prashant-Kumar-1947183015386369,
You are filling up dp in wrong order, fill it like we do in Matrix Chain dp.

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.