Python solution
Recursive:\n\nclass Solution(object):\n    def isSymmetric(self, root):\n        """\n        :type root: TreeNode\n        :rtype: bool\n        """\n        d
Recursive:\n```\nclass Solution(object):\n    def isSymmetric(self, root):\n        """\n        :type root: TreeNode\n        :rtype: bool\n        """\n        def isSym(root1, root2):\n            if root1 == None and root2 == None:\n                return True\n            elif root1 == None and root2 != None:\n                return False\n            elif root1 != None and root2 == None:\n                return False\n            else:\n                if root1.val != root2.val:\n                    return False\n                else:\n                    return isSym(root1.left, root2.right) and isSym(root1.right,root2.left)\n        return root == None or isSym(root.left,root.right)\n```\nIterative (DFS):\n```\nclass Solution(object):\n    def isSymmetric(self, root):\n        """\n        :type root: TreeNode\n        :rtype: bool\n        """\n        if root == None:\n            return True\n        stack = [root,root]\n        while stack:\n            r1 = stack.pop()\n            r2 = stack.pop()\n            if r1 == None and r2 == None:\n                continue\n            if r1 == None or r2 == None:\n                return False\n            if r1.val != r2.val:\n                return False\n            stack.append(r1.left)\n            stack.append(r2.right)\n            stack.append(r1.right)\n            stack.append(r2.left)\n        return True\n```\nIterative (BFS):\n```\nclass Solution(object):\n    def isSymmetric(self, root):\n        """\n        :type root: TreeNode\n        :rtype: bool\n        """\n        if root == None:\n            return True\n        queue = collections.deque([root, root])\n        while queue:\n            r1 = queue.pop()\n            r2 = queue.pop()\n            if r1 == None and r2 == None:\n                continue\n            if r1 == None or r2 == None:\n                return False\n            if r1.val != r2.val:\n                return False\n            queue.append(r1.left)\n            queue.append(r2.right)\n            queue.append(r1.right)\n            queue.append(r2.left)\n        return True\n```
[]