实现函数:
int count=0;
int LeafNode(BiTree T){
if(T==NULL) return 0;
else if(T->lchild==NULL&&T->rchild==NULL) count++;//是否是叶子结点的判断
LeafNode(T->lchild);
LeafNode(T->rchild);
return chount;
}
更多推荐
实现函数:int count=0;int LeafNode(BiTree T){if(T==NULL) return 0;else count++;LeafNode(T->lchild);LeafNode(T->rchild);return chount;}
实现函数:
int count=0;
int LeafNode(BiTree T){
if(T==NULL) return 0;
else if(T->lchild==NULL&&T->rchild==NULL) count++;//是否是叶子结点的判断
LeafNode(T->lchild);
LeafNode(T->rchild);
return chount;
}
更多推荐