代码的关键的如何通过递归来实现对叶子节点的计数,
#include"stdio.h"
#include"stdlib.h"
typedef struct node
{
char data;
struct node *rchild,*lchild;
} tree;
//按照先序序列的方式构建二叉树
tree* create()
{
tree *u;
char r;
r=getchar();
if(r=='*')return NULL;
else
{
u=(tree*)malloc(sizeof(tree));
u->data=r;
u->rchild=create();
u->lchild=create();
return u;
}
}
//进行递归的方式计算二叉数的叶子节点的计算
int count(tree* t)
{
int k=0;</