上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: /*二叉树前序、中序、层次层次遍历*/ #include<stdio.h> #include<malloc.h> typedef char ElemType; typedef struct BiTNode { ElemType val; struct BiTNode *lchild,*rchild; 阅读全文
posted @ 2020-07-23 20:10 石乐智先生 阅读(187) 评论(0) 推荐(0) 编辑
摘要: /*二叉树递归遍历*/ #include<stdio.h> #include<malloc.h> typedef char ElemType; typedef struct BitNode { ElemType data; struct BitNode * lchild,*rchild; }BitN 阅读全文
posted @ 2020-07-16 21:29 石乐智先生 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #define MaxSize 255 typedef struct { char ch[MaxSize]; int length; }SString; void InitStr(SString &S) { S.ch[0]=' '; S.length=0; } v 阅读全文
posted @ 2020-07-13 20:29 石乐智先生 阅读(278) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #define MaxSize 255 typedef struct { char ch[MaxSize]; int length; }SString; void InitStr(SString &S) { S.ch[0]=' '; S.length=0; } v 阅读全文
posted @ 2020-07-13 20:08 石乐智先生 阅读(355) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #define MaxSize 255 typedef struct { char ch[MaxSize]; int length; }SString; void InitStr(SString &S) { S.ch[0]='¥'; S.length=0; } v 阅读全文
posted @ 2020-07-12 21:15 石乐智先生 阅读(699) 评论(0) 推荐(0) 编辑
摘要: (一):中缀表达式转后缀表达式从左到右处理各个元素1.遇到操作数。直接加入后缀表达式2.遇到界限符。遇到'('直接入栈,遇到')'则依次弹出栈内运算符并加入后缀表达式,直到弹出'('为止。注意:'('不加入后缀表达式。3.遇到运算符。依次弹出栈中优先级高于或等于当前运算符的所有运算符,并加入后缀表达 阅读全文
posted @ 2020-07-04 21:21 石乐智先生 阅读(701) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #define MaxSize 10 typedef char ElemType; typedef struct { ElemType data[MaxSize]; int top; }SList; void InitSList(SList &S) { S.top 阅读全文
posted @ 2020-07-03 22:04 石乐智先生 阅读(272) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<malloc.h> typedef char ElemType; typedef struct LinkNode { ElemType data; struct LinkNode *next; }LinkNode; typedef struct 阅读全文
posted @ 2020-06-28 21:10 石乐智先生 阅读(643) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<malloc.h> typedef char ElemType; typedef struct LinkNode { ElemType data; struct LinkNode *next; }LinkNode; typedef struct 阅读全文
posted @ 2020-06-28 10:39 石乐智先生 阅读(403) 评论(0) 推荐(0) 编辑
摘要: /*增设表示元素个数的数据*/ #include<stdio.h> #define MaxSize 10 typedef char ElemType; typedef struct { ElemType data[MaxSize]; int front,rear; int size; }SqQueu 阅读全文
posted @ 2020-06-27 19:27 石乐智先生 阅读(249) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页