We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44afa53 commit 4c0ca3cCopy full SHA for 4c0ca3c
Dynamic-Programming/LongestPalindromicSubsequence.js
@@ -19,7 +19,7 @@ const longestPalindromeSubsequence = function (s) {
19
for (let i = 1; i < n; i++) {
20
for (let j = 0; j < n - i; j++) {
21
const col = j + i
22
- if (s[j] == s[col]) {
+ if (s[j] === s[col]) {
23
dp[j][col] = 2 + dp[j + 1][col - 1]
24
} else {
25
dp[j][col] = Math.max(dp[j][col - 1], dp[j + 1][col])
0 commit comments