循环队列(弥补队列顺序储存的不足)
摘要:1 #include 2 #include 3 using namespace std; 4 5 #define MAXSIZE 10 6 struct quene 7 { 8 int count; 9 int number[MAXSIZE]; 10 int front; 11 int end; 12 }; 13 14 15 void in...
阅读全文
posted @
2017-02-25 11:01
郑哲
阅读(185)
推荐(0) 编辑
队列的顺序储存
摘要:1 #include 2 #include 3 using namespace std; 4 5 #define MAXSIZE 10 6 struct quene 7 { 8 int count; 9 int number[MAXSIZE]; 10 int front; 11 int end; 12 }; 13 14 15 void in...
阅读全文
posted @
2017-02-25 10:52
郑哲
阅读(148)
推荐(0) 编辑
队列链式结构
摘要:#include<iostream>#include<ctime>using namespace std; struct node{ int number; node *next;}; struct quene{ int count; node *front; node *end;}; void i
阅读全文
posted @
2017-02-25 10:25
郑哲
阅读(169)
推荐(0) 编辑
链栈
摘要:1 #include 2 #include 3 using namespace std; 4 5 struct linknode 6 { 7 int number; 8 linknode *next; 9 }; 10 11 12 struct linkstack 13 { 14 int count; 15 linknode *top; 16...
阅读全文
posted @
2017-02-24 13:29
郑哲
阅读(101)
推荐(0) 编辑
两栈共享空间
摘要:1 #define MAXSIZE 100 2 3 struct doublestack 4 { 5 int number[MAXSIZE]; 6 int top1=-1; 7 int top2=MAXSIZE; 8 }; 9 10 11 void Push(doublestack *s, int e, int n) 12 { 13 //栈...
阅读全文
posted @
2017-02-24 13:03
郑哲
阅读(139)
推荐(0) 编辑
栈的顺序结构
摘要:1 #include 2 #include 3 using namespace std; 4 5 #define MAXSIZE 10 6 7 struct stack 8 { 9 int number[MAXSIZE]; 10 int top=-1; 11 }; 12 13 bool Push(stack *s, int e) 14 { 15 i...
阅读全文
posted @
2017-02-24 11:15
郑哲
阅读(134)
推荐(0) 编辑
单向链表的实现
摘要:#include<iostream>#include<ctime>using namespace std; struct list{ int number; list *next;}; int FindLinkList(list *t, int i){ int j = 0; list *p = t;
阅读全文
posted @
2017-02-23 20:25
郑哲
阅读(108)
推荐(0) 编辑