Skip to content

Commit

Permalink
docs: fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sl1673495 committed Jun 11, 2020
1 parent a016618 commit aa04bec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DFS问题/复原ip地址-93.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ let restoreIpAddresses = function (s) {
let res = []
let findPos = (start, prev, used) => {
if (used === 3) {
// 点全部用光后 剩余字符的长度不能超过3 就是一个答案
let rest = s.substr(start)
// 最后一位不能为0 且长度在 (0,3] 范围内
// 点全部用光后 剩余字符依然是一个合格的ip chunk
// 就视为一个答案 放入数组
if (isValidChunk(rest)) {
res.push(prev.concat(rest).join("."))
}
Expand Down

0 comments on commit aa04bec

Please sign in to comment.