Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
Lab012
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
DS Lab Group
实验项目模板
Lab012
提交
3b82a0c2
提交
3b82a0c2
5月 21, 2019
创建
作者:
宋海霞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify
上级
307432c9
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
19 行增加
和
19 行删除
+19
-19
Stack.h
Stack.h
+9
-9
ThreadBinaryTree.h
ThreadBinaryTree.h
+10
-10
没有找到文件。
Stack.h
浏览文件 @
3b82a0c2
...
...
@@ -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
;
typedef
struct
Stack
{
struct
BiThrNode
*
buffer
[
MAX_STACK_LENGTH
];
//
栈的缓冲区
int
top
;
//
指示栈顶的位置,而不是栈中元素的个数
struct
BiThrNode
*
buffer
[
MAX_STACK_LENGTH
];
//
Stack buffer
int
top
;
//
Indicates the position at the top of the stack, not the number of elements in the stack
}
Stack
;
//
//
在此处声明函数
//
Declare the function here
//
void
InitStack
(
Stack
*
pS
);
...
...
@@ -39,7 +39,7 @@ struct BiThrNode* Push(Stack* pS, struct BiThrNode* Elem);
//
//
在此处声明全局变量
//
Declare global variables here
//
...
...
ThreadBinaryTree.h
浏览文件 @
3b82a0c2
...
...
@@ -3,14 +3,14 @@
//
//
在此处包含 C 标准库头文件
//
Include the C standard library header file here
//
#include <stdio.h>
//
//
在此处包含其他头文件
//
Other header files are included here
//
...
...
@@ -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
unsigned
int
PtrTag
;
typedef
struct
_BiThrNode
{
ElemType
data
;
//
二叉树节点的数据
struct
_BiThrNode
*
lchild
;
//
左孩子指针
struct
_BiThrNode
*
rchild
;
//
右孩子指针
PtrTag
ltag
,
rtag
;
//
左右标识域
ElemType
data
;
//
Binary tree node data
struct
_BiThrNode
*
lchild
;
//
Left child pointer
struct
_BiThrNode
*
rchild
;
//
Right child pointer
PtrTag
ltag
,
rtag
;
//
Left and right identification fields
}
BiThrNode
,
*
PBiThrTree
;
//
//
在此处声明函数
//
Declare the function here
//
BiThrNode
*
CreateNode
(
ElemType
data
);
...
...
@@ -45,7 +45,7 @@ int InOrderThreading(PBiThrTree pHead, PBiThrTree pTree);
void
OutputResult
(
PBiThrTree
pHead
,
PBiThrTree
pTree
);
//
//
在此处声明全局变量
//
Declare global variables here
//
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论