class Solution {

public:

bool isSymmetric(TreeNode *root) {

if (root == NULL)

return true;

```
return symmetric(root->left, root->right);
}
bool symmetric(TreeNode *left, TreeNode *right){
if (left != right)
return false;
if (left == NULL&& right == NULL)
return true;
if (symmetric(left->right, right->left) == false)
return false;
if (symmetric(left->left, right->right) == false)
return false;
return true;
}
```

};