*Java* iterative & recursive solutions
Recursive#\n    public boolean isSymmetric(TreeNode root) {\n    \tif(root==null) return true;\n    \treturn isSymmetric(root.left, root.right);\n    }\n    pri
#Recursive#\n    public boolean isSymmetric(TreeNode root) {\n    \tif(root==null) return true;\n    \treturn isSymmetric(root.left, root.right);\n    }\n    private boolean isSymmetric(TreeNode root1, TreeNode root2) {\n    \tif(root1==null && root2==null) return true;\n    \tif(root1==null || root2==null) return false;\n    \tif(root1.val!=root2.val) return false;\n    \treturn isSymmetric(root1.left, root2.right) && isSymmetric(root1.right, root2.left);\n    }\n#Iterative#\n    public boolean isSymmetric(TreeNode root) {\n    \tif(root==null) return true;\n    \tQueue<TreeNode> q1=new LinkedList<>(), q2=new LinkedList<>();\n    \tq1.add(root.left); \n    \tq2.add(root.right);\n    \twhile(!q1.isEmpty() && !q2.isEmpty()) {\n    \t\tint size1=q1.size(), size2=q2.size();\n    \t\tif(size1!=size2) return false;\n    \t\tfor(int i=0; i<size1; i++) {\n    \t\t\tTreeNode current1=q1.remove(), current2=q2.remove();\n    \t\t\tif(current1==null && current2==null) continue;\n    \t\t\tif(current1==null || current2==null) return false; \n    \t\t\tif(current1.val!=current2.val) return false;\n    \t\t\tq1.add(current1.left);\n    \t\t\tq1.add(current1.right);\n    \t\t\tq2.add(current2.right);\n    \t\t\tq2.add(current2.left);\n    \t\t}\n    \t}\n    \treturn q1.isEmpty() && q2.isEmpty();\n    }
['Java']