Skip to content

Commit

Permalink
添加 二叉树:以为使用了递归,其实还隐藏着回溯 go版本
Browse files Browse the repository at this point in the history
添加 二叉树:以为使用了递归,其实还隐藏着回溯 go版本
  • Loading branch information
X-shuffle authored Jun 12, 2021
1 parent ecf5ff1 commit 14542ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion problems/二叉树中递归带着回溯.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ class Solution:
```

Go:

100.相同的树
```go
/**
Expand All @@ -351,7 +352,6 @@ func isSameTree(p *TreeNode, q *TreeNode) bool {
case p == nil && q == nil:
return true
case p == nil || q == nil:
fmt.Println(p,q)
fallthrough
case p.Val != q.Val:
return false
Expand Down

0 comments on commit 14542ac

Please sign in to comment.