Skip to content

Commit 8181b26

Browse files
author
Kevin Nguyen
committed
code for chapter 9 in javascript
1 parent 4a98a14 commit 8181b26

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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] = Math.max(cell[i-1][j], cell[i][j-1]);
7+
}

0 commit comments

Comments
 (0)