Merge pull request #982 from tlylt/fix-77-python

fix Qn0077 Python indent
This commit is contained in:
程序员Carl
2022-01-06 20:51:12 +08:00
committed by GitHub
3 changed files with 6 additions and 7 deletions

View File

@@ -422,13 +422,13 @@ class Solution:
def backtrack(n,k,startIndex):
if len(path) == k:
res.append(path[:])
return
return
for i in range(startIndex,n - (k - len(path)) + 2): #优化的地方
path.append(i) #处理节点
backtrack(n,k,i+1) #递归
path.pop() #回溯,撤销处理的节点
backtrack(n,k,1)
return res
backtrack(n,k,1)
return res
```