队列
文章平均质量分 77
徐诚武
小白
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
链队列的基本操作
用链表表示的队列简称为链队列。 一个链队列显然需要分别指示队头和队尾的两个指针。 #include #include #include #include using namespace std; typedef struct node { int data; struct node *next; } Node,*LinkQueue;//链队结点的类型及指针 typ原创 2016-04-01 18:55:37 · 1798 阅读 · 0 评论 -
循环队列的基本操作
队列的顺序表示和实现#include <iostream> #include <cstring> #include <cstdio> #include <cstdlib> #define MAXQSIZE 100 using namespace std;typedef struct node { int *data; int front,rear; } SqQueue; bool I原创 2016-04-01 21:26:31 · 1138 阅读 · 0 评论 -
循环队列 输出杨辉三角
主要在于travelQueue函数的编写,一看应该就会明白#include <iostream> #include <cstring> #include <cstdio> #include <cstdlib> #define MAXQSIZE 100 using namespace std;typedef struct node { int *data; int front,rear原创 2016-04-01 23:53:17 · 6870 阅读 · 0 评论 -
数据结构3
栈和队列 1、设计算法将中缀表达式转换为后缀表达式,并对后缀表达式求值。 2、请利用两个栈S1和S2来模拟一个队列。已知栈的三个操作定义如下:PUSH(ST,x),元素x入栈ST,POP(ST,X),ST栈顶元素出栈并赋给变量x;Sempty(ST),判断ST栈是否为空。那么利用栈的操作来实现该队列的三个操作:EnQueue,插入一个元素入队;DeQueue,删除一个元素出队;QueueEmpt原创 2016-04-02 11:55:25 · 480 阅读 · 0 评论
分享