中序遍历非递归算法演示.pptx
int NInorderTraverse(BiTree &Tint*visit(char e) { InitStack(S; Push(S,T;//根指针入栈 while!StackEmpty(S)//在树不空的情况下 { while(GetTop(S,p&p) Push(S,p->lchild;//向左走到头 Pop(S,p;//空指针退栈 if!StackEmpty(S) { Pop(S,p;
下载地址
用户评论