提交 307432c9 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 f7ea3af0
......@@ -13,12 +13,12 @@ int main(int argc, char* argv[])
InitStack(&stack);
//
// 创建线索二叉树
// Create a binary tree of clues
//
pTree = InitTree();
//
// 线索化二叉树
// Threaded Binary Tree
//
pHead = CreateNode(0);
......@@ -29,20 +29,20 @@ int main(int argc, char* argv[])
/*
function:
Middle order traverses binary trees pTree ,并将其线索化,pHead 指向其头节点.
Middle order traverses binary trees pTree ,And clue them in,pHead Points to its head node.
parameter:
pTree -- pointer to a clue binary tree.
pHead -- pointer to a clue binary tree,指向头节点
pHead -- pointer to a clue binary tree,Head node
returned value:
线索化成功返回 1.
线索化失败返回 0.
Cue success returns 1.
Cue fail returns 1.
*/
int InOrderThreading(PBiThrTree pHead, PBiThrTree pTree)
{
BiThrNode* pNode; // Pointer to the clue binary tree node
BiThrNode* pPre; // pPre 指针指向刚刚访问过的节点
BiThrNode* pPre; // The pPre pointer points to the node that was just accessed
//
......@@ -57,10 +57,10 @@ int InOrderThreading(PBiThrTree pHead, PBiThrTree pTree)
/*
function:
创建线索二叉树的一个节点.
Creates a node in the thread binary tree.
parameter:
data -- 线索Binary tree nodes store data
data -- the thread binary tree nodes store data
returned value:
Return node pointer
......@@ -80,10 +80,10 @@ BiThrNode* CreateNode(ElemType data)
/*
function:
利用二叉树的先序序列创建一棵二叉树.
Creates a binary tree using the preordering sequence of the binary tree.
returned value:
返回pointer to a binary tree
Return pointer to a binary tree
*/
static const char* data = "-+ *b -c d /e"; // A binary tree preordered sequence string.
// notice:Using only preordered sequences does not determine a unique binary tree.
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论