2 lines Java solution use 1ms
\n\n    public class Solution {\n        public boolean isSymmetric(TreeNode root) {\n            return isMirror(root,root);\n        }\n    \n        public b
\n\n    public class Solution {\n        public boolean isSymmetric(TreeNode root) {\n            return isMirror(root,root);\n        }\n    \n        public boolean isMirror(TreeNode a,TreeNode b){\n            return a==null||b==null?a==b:a.val==b.val&&isMirror(a.left,b.right)&&isMirror(a.right,b.left);\n        }\n    }
[]