void houxu(BiTree T) { if (T) { houxu(T->lchild); houxu(T->rchild); printf("%c",T->data); } }
void main() { BiTree T; int sum,dep; printf("please input data: "); T=Create(T); printf("xianxu: "); Preorder(T); printf("\n"); printf("zhongxu: "); zhongxu(T); printf("\n"); printf("houxu: "); houxu(T); printf("\n"); }
int main() { BiTree T = NULL; int sum,dep; T = Create(T); Preorder(T); printf("\n"); zhongxu(T); printf("\n"); houxu(T); printf("\n"); sum=Sumleaf(T); printf("%d",sum); dep=Depth(T); printf("\n%d",dep); return 0; }