Python short recursive and iterative solutions
\n    def isSymmetric(self, root):\n        if not root:\n            return True\n        return self.dfs(root.left, root.right)\n        \n    def dfs(self, l
\n    def isSymmetric(self, root):\n        if not root:\n            return True\n        return self.dfs(root.left, root.right)\n        \n    def dfs(self, l, r):\n        if l and r:\n            return l.val == r.val and self.dfs(l.left, r.right) and self.dfs(l.right, r.left)\n        return l == r\n\t\t\n\tdef isSymmetric(self, root):\n        if not root:\n            return True\n        stack = [(root.left, root.right)]\n        while stack:\n            l, r = stack.pop()\n            if not l and not r:\n                continue\n            if not l or not r or (l.val != r.val):\n                return False\n            stack.append((l.left, r.right))\n            stack.append((l.right, r.left))\n        return True
['Recursion', 'Python']