bool Symmetric(BinNode *left,BinNode *right){ if(left == NULL && right == NULL) return true; else if(left != NULL && right != NULL){ return (left->data == right->data && Symmetric(left->lchild,right->rchild) && Symmetric(left->rchild,right->lchild)); }else{ return false; } }
Group Group::symmetric(int n) {return Group(Symmetric(n)); }
bool IsSymmetricTree(BinTree r){ if (r == NULL) return false; return Symmetric(r->lchild,r->rchild); }