text: Matrix A [ i ] has dimension p [ i - 1 ] x p [ i ] for i = 1. . n
code: def MatrixChainOrder ( p , i , j ) : NEW_LINE INDENT if i == j : NEW_LINE INDENT return 0 NEW_LINE DEDENT _min = sys . maxsize NEW_LINE DEDENT