4ms Simple C++ code
class Solution {\n    public:\n    bool isSymmetric(TreeNode* root) {\n            if (!root){\n                return true;\n            }\n            else{\n
    class Solution {\n    public:\n    bool isSymmetric(TreeNode* root) {\n            if (!root){\n                return true;\n            }\n            else{\n                return isSame(root->left, root->right);\n            }\n        }\n    private: // hide functions in the private helps to improve running time\n        bool isSame (TreeNode* n1, TreeNode* n2){\n            if (!n1 || !n2){\n                return n1 == n2;\n            }\n            else{\n                return (n1->val == n2->val && isSame(n1->left, n2->right) && isSame(n1->right, n2->left));\n            }\n        }\n    };
['Recursion', 'C++']