I didn’t get it how to solve please help??
Matrix chain problem
for(int k=i;k<j;k++){
int temp=matrixChain(m,i,k)+matrixChain(m,k+1,j)+m[i-1]*m[k]*m[j];
ans=min(temp,ans);
}
This one
@ashwani225 to multiply we can place a pivot point, we solve on the left and right parts of the pivot point and then multiply those, and find the answer. This pivot point can be anything, we dont know which pivot will give the best answer so we loop through all the possibilities with the help of K. just watch the video again it will become clear
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.