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