diff --git a/_04.树/_b.二叉树链式结构.c b/_04.树/_b.二叉树链式结构.c index 8888c9e..12991c0 100644 --- a/_04.树/_b.二叉树链式结构.c +++ b/_04.树/_b.二叉树链式结构.c @@ -2,12 +2,12 @@ * @Author: Xu Bai * @Date: 2019-07-13 22:24:04 * @LastEditors: Xu Bai - * @LastEditTime: 2019-07-19 22:49:14 + * @LastEditTime: 2019-07-23 22:51:03 */ #include "string.h" #include "stdio.h" #include "stdlib.h" -#include "io.h" +//#include "io.h" #define OK 1 #define ERROR 0 @@ -44,7 +44,7 @@ Status StrAssign(String T, char *chars) typedef char ElemType; /*ַԿոΪ */ -ElemType Nil = ' '; +ElemType Nil = '#'; Status visit(ElemType e) { diff --git a/_04.树/_c.线索二叉树.c b/_04.树/_c.线索二叉树.c new file mode 100644 index 0000000..93f0b6d --- /dev/null +++ b/_04.树/_c.线索二叉树.c @@ -0,0 +1,41 @@ +/* + * @Author: Xu Bai + * @Date: 2019-07-23 22:43:14 + * @LastEditors: Xu Bai + * @LastEditTime: 2019-07-23 22:52:27 + */ +#include "string.h" +#include "stdio.h" +#include "stdlib.h" +#include "io.h" + +#define OK 1 +#define ERROR 0 +#define TRUE 1 +#define FALSE 0 +#define MAXSIZE 100 + +typedef int Status; +typedef char ElemType; +/*Link==0ʾָҺָ룬Thread==ʾ */ +typedef enum +{ + Link, + Thread +} PointerTag; + +typedef struct BiThrNode +{ + ElemType data; + struct BiThrNode *lchild, *rchild; + PointerTag LTag; + PointerTag RTag; +} BiThrNode, *BiThrTree; + +ElemType Nil = '#'; + +Status visit(ElemType e) +{ + printf("%c ", e); + return OK; +} \ No newline at end of file