Skip to content

Commit 928a65c

Browse files
aQuaaQua
aQua
authored and
aQua
committed
101 修改细节
1 parent a578e6d commit 928a65c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Algorithms/0101.symmetric-tree/symmetric-tree.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ func isSymmetric(root *TreeNode) bool {
1111
return true
1212
}
1313

14-
return cur(root.Left, root.Right)
14+
return recur(root.Left, root.Right)
1515
}
1616

17-
func cur(left, right *TreeNode) bool {
17+
func recur(left, right *TreeNode) bool {
1818
if left == nil && right == nil {
1919
return true
2020
}
@@ -23,5 +23,5 @@ func cur(left, right *TreeNode) bool {
2323
return false
2424
}
2525

26-
return left.Val == right.Val && cur(left.Left, right.Right) && cur(left.Right, right.Left)
26+
return left.Val == right.Val && recur(left.Left, right.Right) && recur(left.Right, right.Left)
2727
}

0 commit comments

Comments
 (0)