Skip to content

Commit fdc34c3

Browse files
committed
Changed some styles as per the rule
1 parent a567585 commit fdc34c3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Dynamic-Programming/LongestCommonSubsequence.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ function longestCommonSubsequence (x, y, str1, str2, dp) {
1111
else {
1212
if (dp[x][y] !== 0){
1313
return dp[x][y]
14-
}
14+
}
1515
else {
1616
if (str1[x] === str2[y]) {
17-
dp[x][y] = 1 + longestCommonSubsequence(x - 1, y - 1, str1, str2, dp);
17+
dp[x][y] = 1 + longestCommonSubsequence(x - 1, y - 1, str1, str2, dp)
1818
return dp[x][y]
19-
}
20-
else {
19+
} else {
2120
dp[x][y] = Math.max(longestCommonSubsequence(x - 1, y, str1, str2, dp), longestCommonSubsequence(x, y - 1, str1, str2, dp))
2221
return dp[x][y]
2322
}

0 commit comments

Comments
 (0)