数据结构第6章树练习.doc
void PreOrder_Nonrecursive(Bitree T)//先序遍历二叉树的非递归算法 { ?InitStack(S; ?Push(S,T; //根指针进栈 ?while!StackEmpty(S) ?{ ?while(Gettop(S,p&p) ?{ ?visit(p->data; ?push(S,p->lchild; ?} //向左走到尽头 ?pop(S,p; ?if!Stac
下载地址
用户评论