python lcs example needs to default to 0 if values dont match

This commit is contained in:
Aditya Bhargava
2022-11-18 14:55:06 -06:00
parent 35bb758f5e
commit 788c54e92b

View File

@@ -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)