2020年12月21日

摘要: 1 //链式队列 2 #include<stdio.h> 3 #include<stdlib.h> 4 typedef int Status; 5 typedef struct node { 6 char a; 7 struct node* next; 8 }NODE; 9 typedef stru 阅读全文
posted @ 2020-12-21 22:35 Sna1lGo 阅读(131) 评论(0) 推荐(0) 编辑
 
摘要: 1 //链式栈 2 #include<stdio.h> 3 #include<stdlib.h> 4 typedef struct Node { 5 char a; 6 struct Node* next; 7 }NODE; 8 //节点 9 typedef struct StackLink { 1 阅读全文
posted @ 2020-12-21 19:24 Sna1lGo 阅读(158) 评论(0) 推荐(0) 编辑
 
摘要: 1 //顺序队列 2 #define MAXSIZE 10//假设队列最多容纳10个数,其实因为是循环队列所以其实只最多能容纳9个数 3 #include<stdio.h> 4 #include<stdlib.h> 5 typedef int Status;//用Status来当作bool类型使用 阅读全文
posted @ 2020-12-21 12:38 Sna1lGo 阅读(135) 评论(0) 推荐(0) 编辑
 
摘要: #include<stdio.h> #define MAXN 20//初始顺序栈的空间为20 typedef int SElemType; typedef int Status; typedef struct SqStack{ char stack[MAXN];//假设栈的数据结构为char int 阅读全文
posted @ 2020-12-21 12:02 Sna1lGo 阅读(182) 评论(0) 推荐(0) 编辑