Question
Consider the following dynamic programming implementation of the matrix chain problem:#include#includeint mat_chain_multiplication(int *mat, int n){ int arr[n][n]; int i,k,row,col,len; for(i=1;i
Answer: Option B
Was this answer helpful ?
The line arr[row][k] + arr[k + 1][col] + mat[row “ 1] * mat[k] * mat[col] should be inserted to complete the above code.
Was this answer helpful ?
Submit Solution