填写横线处语句,完成二叉树的中序遍历算法。 void InOrder_n(BiTree T) { printf("nPreOrder_n"); BiTree stack[MAX],p;/*建立堆栈*/ int top=0; if(!T) return; p=T; while(p||top>0) { if(p) { } else if(top>0) { p=stack[--top]; printf("%5c",p->data); p=p->rchild; } } }

时间:2024-03-10 15:44:01

相似题目