1.先序遍历非递归算法void PreOrderUnrec(Bitree *t){ Stack s; StackInit(s); Bitree *p=t; while (p!=NULL || !StackEmpty(s)) { while (p!=NULL) //遍历左子树 { visite(p->data); push(s,p); p=p->lchild; } if (!StackEmpty(s)) //通过下一次循环中的内嵌while实现右子树遍历 { p=pop(s); p=p->rchild; }//endif }//endwhile }void PreOrderUnrec(Bitree *t){ St 你的当前访问异常,请进行认证后继续阅读剩余内容。 提交