mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Modify the problem of preorder_traversal_iii
This commit is contained in:
@ -20,6 +20,7 @@ def pre_order(root: TreeNode) -> None:
|
||||
if root.val == 7:
|
||||
# 记录解
|
||||
res.append(list(path))
|
||||
return
|
||||
pre_order(root.left)
|
||||
pre_order(root.right)
|
||||
# 回退
|
||||
|
||||
Reference in New Issue
Block a user