diff --git a/problems/0131.分割回文串.md b/problems/0131.分割回文串.md index 7a702898..6a370fb4 100644 --- a/problems/0131.分割回文串.md +++ b/problems/0131.分割回文串.md @@ -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(); }