mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-17 14:10:57 +00:00
feat(go/tree): support array binary tree (#655)
This commit is contained in:
@@ -15,7 +15,7 @@ func preOrderII(root *TreeNode, res *[][]*TreeNode, path *[]*TreeNode) {
|
||||
}
|
||||
// 尝试
|
||||
*path = append(*path, root)
|
||||
if int(root.Val) == 7 {
|
||||
if root.Val.(int) == 7 {
|
||||
// 记录解
|
||||
*res = append(*res, *path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user