Skip to content

Latest commit

 

History

History
6 lines (4 loc) · 411 Bytes

File metadata and controls

6 lines (4 loc) · 411 Bytes

Matrix Chain Multiplication

Given an array p[] which represents the chain of matrices such that the ith matrix Ai is of dimension p[i-1] x p[i]. We need to write a function MatrixChainOrder() that should return the minimum number of multiplications needed to multiply the chain.

A graphical example of Matrix Chain Multiplication