From 082302078bd1e4a354f21a4b8f77a9a6b389940b Mon Sep 17 00:00:00 2001 From: tlylt Date: Sat, 1 Jan 2022 11:17:07 +0800 Subject: [PATCH] fix Qn0077 python indent --- problems/0077.组合.md | 2 +- problems/0077.组合优化.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/problems/0077.组合.md b/problems/0077.组合.md index 4ec154e1..c00f1efb 100644 --- a/problems/0077.组合.md +++ b/problems/0077.组合.md @@ -422,7 +422,7 @@ 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) #递归 diff --git a/problems/0077.组合优化.md b/problems/0077.组合优化.md index 5fe56e82..4eec1608 100644 --- a/problems/0077.组合优化.md +++ b/problems/0077.组合优化.md @@ -182,7 +182,7 @@ 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) #递归