mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-24 02:21:30 +08:00
fix(go): fix go code , refer to @joengtou @wcig @shenjq (#992)
This commit is contained in:
@@ -17,7 +17,7 @@ func preOrderII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) {
|
||||
*path = append(*path, root)
|
||||
if root.Val.(int) == 7 {
|
||||
// 记录解
|
||||
*res = append(*res, *path)
|
||||
*res = append(*res, append([]*TreeNode{}, *path...))
|
||||
}
|
||||
preOrderII(root.Left, res, path)
|
||||
preOrderII(root.Right, res, path)
|
||||
|
||||
Reference in New Issue
Block a user