15 lines of c++ solution / 8 ms
bool isSymmetric(TreeNode *root) {\n            if (!root) return true;\n            return helper(root->left, root->right);\n        }\n        \n        bool 
    bool isSymmetric(TreeNode *root) {\n            if (!root) return true;\n            return helper(root->left, root->right);\n        }\n        \n        bool helper(TreeNode* p, TreeNode* q) {\n            if (!p && !q) {\n                return true;\n            } else if (!p || !q) {\n                return false;\n            }\n            \n            if (p->val != q->val) {\n                return false;\n            }\n            \n            return helper(p->left,q->right) && helper(p->right, q->left); \n        }
['Recursion']