Java Solution #1ms 4 lines code #Recursive Easy To Understand
\tpublic static boolean isSymmetric(TreeNode root) {\n\t\treturn isSymmetric(root,root);\n\t}\n\t\n\tpublic static boolean isSymmetric(TreeNode p, TreeNode q){\
\tpublic static boolean isSymmetric(TreeNode root) {\n\t\treturn isSymmetric(root,root);\n\t}\n\t\n\tpublic static boolean isSymmetric(TreeNode p, TreeNode q){\n\t\tif(p==null && q==null) return true;\n\t\tif(p==null || q==null) return false;\n\t\t\n\t\treturn p.val ==q.val&&isSymmetric(p.left,q.right)&&isSymmetric(p.right,q.left);\n\t}
[]