计算二叉树叶子节点个数
typedef struct{
ElemType data;
struct BiTNode *lchild,*rchild;
}BiTNode,*BiTree;
//sum=lsum+rsum
int SumY(BiTree T){
int l,r;
if(T==NULL)
return 0;
if(T->lchild==NULL&&T->rchild==NULL)
return 1;
l=SumY(T->lchild);
r=SumY(T->rchild);
return l+r;
}