//
typedef enum PointerTag{link
typedef Struc BithrNode{
TelemType data;
struct Bithrnode *lchild
PointerTag Ltag
}BiThrNode
Status InOrderTraverse_Thr(BiThrTree t
//T
p=T
while(p!=t){
while(p
if(!Visit(p
while(p
p=p
}
p=p
}return ok;
}//InOrderTraverse_Thr
Status InOrderThreading(BiThrTree &Thrt
//中序遍歷二叉樹T
If(!(Thrt=(BiThrTree)malloc(sizeof(BiThrNode))))
exit(OVERFLOW);
Thrt
Thrt
If(!T)Thrt
InThreading(T
Pre
Thrt
}
return ok;
}//InOrderThreading
返回《數據結構》考研復習精編
[
From:http://tw.wingwit.com/Article/program/sjjg/201311/23656.html