algorithm-in-python/algorithm/dynamic-programming/matrix-multiply.py

5 lines
140 B
Python
Raw Normal View History

2018-08-29 15:52:02 +08:00
def adjustOrd(sizes):
''' adjust the chain-multiply of matrix, sizes=[row1,row2,..,rown,coln]'''
n = len(sizes)
if n<3: return