会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Alexander
管理
随笔
分类
打印
打赏
QQ
WX
Git
编辑
管理
随笔 - 13
文章 - 0
评论 - 4
阅读 -
2319
2019年8月15日
Title
摘要: 1、 2 3 4
阅读全文
posted @ 2019-08-15 21:00 aascn
阅读(149)
评论(4)
推荐(0)
2019年5月3日
4.2 线索二叉树
摘要: 1. 创建
阅读全文
posted @ 2019-05-03 20:43 aascn
阅读(160)
评论(0)
推荐(0)
4.1 二叉树的基本操作
摘要: #include #include #include #include using namespace std; typedef struct node{ char data; struct node *lchild; struct node *rchild; }Node; void CreateTree(Node * &T){ char ch; ...
阅读全文
posted @ 2019-05-03 20:41 aascn
阅读(211)
评论(0)
推荐(0)
3.3 循环队列
摘要: // 循环队列采用顺序存储,为了区分队头和队尾,从1号下标开始存储 // 队头队尾同时指向0号下标表示队空,队尾下标的下一个元素是队头的时候表示队满 // 可以设置front指向队头元素,rear指向队尾元素的下一个位置 // 或者设置front指向队头元素的下一个节点,rear指向队尾元素 // 本程序采用前一种,后一种在操作的时候略有不便 // 出队的时候front+1,入队的时候rear+...
阅读全文
posted @ 2019-05-03 20:35 aascn
阅读(182)
评论(0)
推荐(0)
3.4 双端队列
摘要: #include #include #define ERROR 1e5 typedef struct Node { int Element; struct Node *next, *last; }*PtrToNode; typedef struct DequeRecord { struct Node *front, *rear; }*Deque; typede...
阅读全文
posted @ 2019-05-03 20:35 aascn
阅读(351)
评论(0)
推荐(0)
3.2 队列-链式存储
摘要: // 带头节点的链式存储队列 #include #include typedef struct node{ int data; struct node * next; }QNode; typedef struct queue{ QNode *front; QNode *rear; }Queue; void initQueue(Queue *Q){ ...
阅读全文
posted @ 2019-05-03 20:33 aascn
阅读(167)
评论(0)
推荐(0)
3.1 队列-顺序存储
摘要: // 队列的顺序存储 // 队空:front=rear=0 // 入队:rear+1 // 出队:front+1 // 该数组无头元素,出队入队都向上。 // 会产生假溢出,即rear=MAXSIZE且元素未填满队列时。 // 如何判断真正的上溢出?rear=MAXSIZE & rear!=0 // 扩展:区分真假溢出,如果是假溢出,可以reset一下。 // 但是如果数据量大,reset或不能...
阅读全文
posted @ 2019-05-03 20:32 aascn
阅读(138)
评论(0)
推荐(0)
2.2 链栈
摘要: #include #include typedef struct _Node{ char data; struct _Node *next; }Node; typedef struct _Stack{ Node * top; }Stack; void initStack(Stack *s){ s->top = (Node*)malloc(sizeof(...
阅读全文
posted @ 2019-05-03 20:30 aascn
阅读(118)
评论(0)
推荐(0)
2.1 顺序栈
摘要: #include #include #define MaxSize 50 // 顺序栈同数组,下标是从0开始,第一个元素占据0号位置,栈空为top=-1,栈满是MaxSize-1 // 记住顺序存储的存储结构。注意有top标记和元素数组 // 关键操作:1.判空(S->top=-1),判满(top=MaxSize-1);2.S->data[++S->top]=e // 一般return的原...
阅读全文
posted @ 2019-05-03 20:28 aascn
阅读(151)
评论(0)
推荐(0)
1.4 双向循环链
摘要: // 该程序使用带头结点的双向循环链表 // 交换节点进行排序 //补充:locate & Insert #include #include typedef struct _Node{ int data; struct _Node *next; struct _Node *prior; }DNode; DNode *createList(){ DNod...
阅读全文
posted @ 2019-05-03 20:26 aascn
阅读(170)
评论(0)
推荐(0)
下一页
🚀
点击右上角即可分享