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

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();
}