以下程序段采用先根遍历方法求二叉树的叶子数,请在______处填充适当的语句。 void countleaf(bitreptr t,int*count)/*根指针为t,假定叶子数count的初值为0*/ { if(t!=NULL)

admin2010-04-24  18

问题 以下程序段采用先根遍历方法求二叉树的叶子数,请在______处填充适当的语句。
   void countleaf(bitreptr t,int*count)/*根指针为t,假定叶子数count的初值为0*/
        { if(t!=NULL)
           { if((t—>lchild==NULL)&&(t—>rchild==NULL))______;
              countleaf(1—>lehild,count);
           ______;
           }
        }

选项

答案*count++ eountleaf(1—>rehild,count)

解析
转载请注明原文地址:https://jikaoti.com/ti/o1taFFFM
本试题收录于: 数据结构题库理工类分类
0

随机试题
最新回复(0)