Remove unnecessary loop in matrix_chain_order.py (#564)

This commit is contained in:
Benedikt Werner 2018-10-31 08:31:49 +01:00 committed by Harshil
parent 3917015545
commit 6db1994de2

View File

@ -11,8 +11,6 @@ def MatrixChainOrder(array):
N=len(array)
Matrix=[[0 for x in range(N)] for x in range(N)]
Sol=[[0 for x in range(N)] for x in range(N)]
for i in range(1,N):
Matrix[i][i]=0
for ChainLength in range(2,N):
for a in range(1,N-ChainLength+1):