提交 3b82a0c2 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 307432c9
...@@ -3,33 +3,33 @@ ...@@ -3,33 +3,33 @@
// //
// 在此处包含 C 标准库头文件 // Include the C standard library header file here
// //
// //
// 在此处包含其他头文件 // Other header files are included here
// //
// //
// 在此处定义数据结构 // Define the data structure here
// //
#define MAX_STACK_LENGTH 64 // 栈的最大长度 #define MAX_STACK_LENGTH 64 // Maximum length of stack
// // Stack
struct BiThrNode; struct BiThrNode;
typedef struct Stack{ typedef struct Stack{
struct BiThrNode* buffer[MAX_STACK_LENGTH]; // 栈的缓冲区 struct BiThrNode* buffer[MAX_STACK_LENGTH]; // Stack buffer
int top; // 指示栈顶的位置,而不是栈中元素的个数 int top; // Indicates the position at the top of the stack, not the number of elements in the stack
}Stack; }Stack;
// //
// 在此处声明函数 // Declare the function here
// //
void InitStack(Stack* pS); void InitStack(Stack* pS);
...@@ -39,7 +39,7 @@ struct BiThrNode* Push(Stack* pS, struct BiThrNode* Elem); ...@@ -39,7 +39,7 @@ struct BiThrNode* Push(Stack* pS, struct BiThrNode* Elem);
// //
// 在此处声明全局变量 // Declare global variables here
// //
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
// //
// 在此处包含 C 标准库头文件 // Include the C standard library header file here
// //
#include <stdio.h> #include <stdio.h>
// //
// 在此处包含其他头文件 // Other header files are included here
// //
...@@ -18,24 +18,24 @@ ...@@ -18,24 +18,24 @@
// //
// 在此处定义数据结构 // Define the data structure here
// //
#define MAX_STRING_SIZE 20 // 字符串存储空间的大小 #define MAX_STRING_SIZE 20 // The size of the string storage space
typedef char ElemType; typedef char ElemType;
typedef unsigned int PtrTag; typedef unsigned int PtrTag;
typedef struct _BiThrNode{ typedef struct _BiThrNode{
ElemType data; // 二叉树节点的数据 ElemType data; // Binary tree node data
struct _BiThrNode* lchild; // 左孩子指针 struct _BiThrNode* lchild; // Left child pointer
struct _BiThrNode* rchild; // 右孩子指针 struct _BiThrNode* rchild; // Right child pointer
PtrTag ltag, rtag; // 左右标识域 PtrTag ltag, rtag; // Left and right identification fields
}BiThrNode, *PBiThrTree; }BiThrNode, *PBiThrTree;
// //
// 在此处声明函数 // Declare the function here
// //
BiThrNode* CreateNode(ElemType data); BiThrNode* CreateNode(ElemType data);
...@@ -45,7 +45,7 @@ int InOrderThreading(PBiThrTree pHead, PBiThrTree pTree); ...@@ -45,7 +45,7 @@ int InOrderThreading(PBiThrTree pHead, PBiThrTree pTree);
void OutputResult(PBiThrTree pHead, PBiThrTree pTree); void OutputResult(PBiThrTree pHead, PBiThrTree pTree);
// //
// 在此处声明全局变量 // Declare global variables here
// //
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论