This commit is contained in:
youngyangyang04
2021-10-25 12:48:55 +08:00
parent 33768a0ffb
commit 104ba7c7a8
19 changed files with 804 additions and 197 deletions

View File

@@ -352,6 +352,7 @@ class Solution(object):
ans = []
path = []
def backtrack(path, startIndex):
if len(s) > 12: return []
if len(path) == 4:
if startIndex == len(s):
ans.append(".".join(path[:]))
@@ -367,7 +368,7 @@ class Solution(object):
path.pop()
backtrack([], 0)
return ans```
return ans
```