Merge pull request #1371 from Jerry-306/patch-52

纠正 0131 分割回文串 JavaScript 版本代码
This commit is contained in:
程序员Carl 2022-06-14 09:37:50 +08:00 committed by GitHub
commit 42970ccae0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -442,7 +442,7 @@ var partition = function(s) {
}
for(let j = i; j < len; j++) {
if(!isPalindrome(s, i, j)) continue;
path.push(s.substr(i, j - i + 1));
path.push(s.slice(i, j + 1));
backtracking(j + 1);
path.pop();
}