Python 3 simple recursion, faster than 97% and less memory than 100%
\n\n\nclass Solution:\n    def isSymmetric(self, root: TreeNode) -> bool:\n        \n        if not root:\n            return True\n        \n        left=root.
\n\n```\nclass Solution:\n    def isSymmetric(self, root: TreeNode) -> bool:\n        \n        if not root:\n            return True\n        \n        left=root.left\n        right=root.right\n        \n        if not left and not right:\n            return True\n        \n        def check(t1, t2):\n            if not t1 and not t2:\n                return True\n            if t1 and not t2:\n                return False\n            if not t1 and t2:\n                return False\n            if t1.val!=t2.val:\n                return False\n            return check(t1.left, t2.right) and check(t1.right, t2.left)\n        \n        return check(left, right)\n                \n```
['Python', 'Python3']