📄 习题-38.c
字号:
//本程序只给出了算法思想
//读者可以自己完善本程序
int LeafCount_BiTree(Bitree T)//求二叉树中叶子结点的数目
{
if(!T)
return 0; //空树没有叶子
else if(!T->lchild&&!T->rchild)
return 1; //叶子结点
else
return Leaf_Count(T->lchild)+Leaf_Count(T->rchild);
//左子树的叶子数加上右子树的叶子数
}//LeafCount_BiTree
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -