Skip to content

Commit 6db1994

Browse files
benediktwernerharshildarji
authored andcommitted
Remove unnecessary loop in matrix_chain_order.py (TheAlgorithms#564)
1 parent 3917015 commit 6db1994

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

dynamic_programming/matrix_chain_order.py

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ def MatrixChainOrder(array):
1111
N=len(array)
1212
Matrix=[[0 for x in range(N)] for x in range(N)]
1313
Sol=[[0 for x in range(N)] for x in range(N)]
14-
for i in range(1,N):
15-
Matrix[i][i]=0
1614

1715
for ChainLength in range(2,N):
1816
for a in range(1,N-ChainLength+1):

0 commit comments

Comments
 (0)