mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-09 05:41:47 +08:00
build
This commit is contained in:
@@ -976,7 +976,9 @@ comments: true
|
||||
"""恢复状态"""
|
||||
state.pop()
|
||||
|
||||
def backtrack(state: list[TreeNode], choices: list[TreeNode], res: list[list[TreeNode]]):
|
||||
def backtrack(
|
||||
state: list[TreeNode], choices: list[TreeNode], res: list[list[TreeNode]]
|
||||
):
|
||||
"""回溯算法:例题三"""
|
||||
# 检查是否为解
|
||||
if is_solution(state):
|
||||
|
||||
Reference in New Issue
Block a user