Recursive one:

```
class Solution:
# @param root, a tree node
# @return a boolean
def isSymmetric(self, root):
# a new recursive function to check if two tree are symetric
def isMirror(root1,root2):
# they all could be Null to be symetric
if not root1 and not root2:
return True
# if they are not Null, they must carry the same value
elif (root1 and root2) and root1.val==root2.val:
# recursively call itself
return isMirror(root1.left,root2.right) and isMirror(root1.right, root2.left)
else:
return False
if not root:
return True
return isMirror(root.left, root.right)
```

Non-recursive one:

```
class Solution:
# @param root, a tree node
# @return a boolean
def isSymmetric(self, root):
if not root :
return True
queue=[[root.left,root.right]] # use a queue to store nodes. Each element in the queue is a pair of nodes. They are supposed to carry the same value. Ortherwise, the tree is not symetric
while queue:
pair=queue.pop(0)
if not (pair[0] or pair[1]):
# if current pair are empty, do nothing
continue
elif (pair[0] and pair[1]) and pair[0].val==pair[1].val:
# if current pair carry the same value, push the their children pairs into the queue
queue.append([pair[0].left,pair[1].right])
queue.append([pair[0].right,pair[1].left])
else:
return False
# if all pairs pass the evaluation, the tree is symmetric
return True
```

Any comments would be appreciated!