typedef struct node{
char data;
struct node *lchild,*rchild;
}NODE;
int a[10]={0};
int i=0;
void breadth(NODE *t)
{
if(t!=NULL)
{
if(i==0)
{
a[0]=1;
i++;
if(t->lchild!=NULL) a[i]++;
if(t->rchild!=NULL) a[i]++;
}
else{
i++;
if(t->lchild!=NULL) a[i]++;
if(t->rchild!=NULL) a[i]++;
}
breadth(t->lchild);
i--;
breadth(t->rchild);
}
}