{ } else
return(NULL); }/*CopyTree*/
t=(bitnode *)malloc (sizeof (bitnode)); t->data=p->data;
t->lchild=CopyTree(p->lchild); t->rchild=CopyTree(p->rchild); return(t);
2.
int BTreeLeafCount(struct BTreeNode* BT)
{
if(BT==NULL) return 0;
else if(BT->left==NULL && BT->right==NULL) return 1;
else return BTreeLeafCount(BT->left)+BTreeLeafCount(BT->right); }
六、完成:实验3――栈、队列、递归程序设计 实验4——图的存储方式和应用
根据实验要求(见教材P203)认真完成本实验,并提交实验报告。
相关推荐: