Skip to content

Commit 87b2eb0

Browse files
committed
Style changed
1 parent 838abad commit 87b2eb0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dynamic-Programming/LongestIncreasingSubsequence.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ function main () {
1414
for (let j = 0; j < i; j++) {
1515
if (x[i] > x[j]) {
1616
dp[i] = Math.max(dp[i], 1 + dp[j])
17-
if (dp[i] > res)
17+
if (dp[i] > res) {
1818
res = dp[i]
19+
}
1920
}
2021
}
2122
}
22-
23+
2324
console.log('Length of Longest Increasing Subsequence is:', res)
2425
}
2526

0 commit comments

Comments
 (0)