Two Simple Accepted Java solutions. Recursion and Iteration.
The idea is simple. Traverse both on left an right branches of the root symmetricaly and check if the values are equal.\n\n\nRecursion.\n\n    public boolean is
The idea is simple. Traverse both on left an right branches of the root symmetricaly and check if the values are equal.\n\n\nRecursion.\n\n    public boolean isSymmetric(TreeNode root) {\n        return root == null ? true : symmetric(root.left, root.right);\n    }\n\t\n\tpublic boolean symmetric(TreeNode left, TreeNode right) {\n        if (left == null && right == null) {\n        \treturn true;\n        } else if (left != null && right != null && left.val == right.val) {\n        \treturn symmetric(left.left, right.right) && symmetric(left.right, right.left);\n        } else {\n        \treturn false;\n        }\n    }\n\n\n\nIteration.\n\n    public boolean isSymmetric(TreeNode root) {\n        if (root == null || (root.left == null && root.right == null)) return true;\n        Stack<TreeNode> L = new Stack<TreeNode>();\n        Stack<TreeNode> R = new Stack<TreeNode>();\n        L.push(root.left);\n        R.push(root.right);\n        \n        while(!L.isEmpty() && !R.isEmpty()) {\n        \tTreeNode left = L.pop();\n        \tTreeNode right = R.pop();\n        \tif (left == null && right == null) continue;\n        \tif (left != null && right != null && left.val == right.val) {\n        \t\tL.push(left.left);\n        \t\tR.push(right.right);\n        \t\tL.push(left.right);\n        \t\tR.push(right.left);\n        \t\tcontinue;\n        \t}\n        \treturn false;\n        }\n        return true;\n    }
[]