We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a578e6d commit 928a65cCopy full SHA for 928a65c
Algorithms/0101.symmetric-tree/symmetric-tree.go
@@ -11,10 +11,10 @@ func isSymmetric(root *TreeNode) bool {
11
return true
12
}
13
14
- return cur(root.Left, root.Right)
+ return recur(root.Left, root.Right)
15
16
17
-func cur(left, right *TreeNode) bool {
+func recur(left, right *TreeNode) bool {
18
if left == nil && right == nil {
19
20
@@ -23,5 +23,5 @@ func cur(left, right *TreeNode) bool {
23
return false
24
25
26
- return left.Val == right.Val && cur(left.Left, right.Right) && cur(left.Right, right.Left)
+ return left.Val == right.Val && recur(left.Left, right.Right) && recur(left.Right, right.Left)
27
0 commit comments