6.24.txt
来自「数据结构实验 如下: Status Fibonacci(int k, int」· 文本 代码 · 共 16 行
TXT
16 行
void Leaves(BiTree bt, int &x)
/* Count the leaf node of the BiTree */
/* whose root node is bt to x. */
{
BiTree p;
p=bt;
if(!p) return ; //空树
if(!p->lchild&&!p->rchild) {
x++;
return ;
}
if(p->lchild) Leaves(p->lchild,x);
if(p->rchild) Leaves(p->rchild,x);
return ;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?