【文件属性】:
文件名称:数据结构 队列的相关操作
文件大小:3KB
文件格式:TXT
更新时间:2014-12-10 04:47:13
队列
数据结构
typedef struct QNode /*Data structure*/
{
int data; /*the data*/
struct QNode *next; /*point the next Node*/
}QNode,*QueuePtr;
typedef struct
{
QueuePtr front; /*head pointer*/
QueuePtr rear; /*tail pointer*/
}LinkQueue;
算法描述
1. 采用队列的链式存储结构参考书中的类C代码,进行相应操作的编写。
2. 代码运行后,自己输入队列的数据,进行初始化以0结束输入。
3. 由堆栈的结果分析进行改进,将可以进行的操作以表的形式输出,用choice进行选择。
4. 最后释放队列所占的空间。