C++ short simple recursive code
\n# Approach\n Describe your approach to solving the problem. \nRecurively check for the subtrees. Return false if they aren\'t equal.\n\n# Code\n\nclass Soluti
\n# Approach\n<!-- Describe your approach to solving the problem. -->\nRecurively check for the subtrees. Return false if they aren\'t equal.\n\n# Code\n```\nclass Solution {\npublic:\n\n    bool isSame(TreeNode* t1, TreeNode* t2){\n        if(!t1 && !t2){return true;}\n        if(t1 && !t2){return false;}\n        if(t2 && !t1){return false;}\n        if(t1->val==t2->val){return isSame(t1->left,t2->right) && isSame(t1->right,t2->left);}\n        return false;\n    }\n\n    bool isSymmetric(TreeNode* root) {\n    return isSame(root->left,root->right);            \n    }\n};\n```\n**Please upvote if it helped. Happy Coding!**
['C++']