Skip to content

Commit 2a01a0f

Browse files
committed
code for chapter 9
1 parent 26aa694 commit 2a01a0f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
if word_a[i] == word_b[j]:
2+
# The letters match.
3+
cell[i][j] = cell[i-1][j-1] + 1
4+
else:
5+
# The letters don't match.
6+
cell[i][j] = max(cell[i-1][j], cell[i][j-1])

0 commit comments

Comments
 (0)