第1个回答 2018-06-24
数据结构
bool hasdegree1(BiTree root){
if(root==NULL)
return false;
if(root->lchild==NULL&&root->rchild==NULL)
return false;
if(root->lchild!=NULL&&root->rchild!=NULL)
return hasdegree1(root->lchild)||hasdegree1(root->rchild);
else return true;
}