python lcs example needs to default to 0 if values dont match
This commit is contained in:
@@ -7,5 +7,7 @@ for i in range(0, len(dp_table_blue)):
|
||||
for j in range(0, len(dp_table_clues)):
|
||||
if dp_table_clues[j] == dp_table_blue[i]:
|
||||
dp_table[i][j] = dp_table[i-1][i-1] + 1
|
||||
else:
|
||||
dp_table[i][j] = 0
|
||||
|
||||
print(dp_table)
|
||||
print(dp_table)
|
||||
|
||||
Reference in New Issue
Block a user