mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
Modify the problem of preorder_traversal_iii
This commit is contained in:
@@ -20,6 +20,7 @@ func preOrder(root: TreeNode?) {
|
||||
if root.val == 7 {
|
||||
// 记录解
|
||||
res.append(path)
|
||||
return
|
||||
}
|
||||
preOrder(root: root.left)
|
||||
preOrder(root: root.right)
|
||||
|
||||
Reference in New Issue
Block a user