数据结构实验第7次课循环队列实现.pptVIP

  • 5
  • 0
  • 约1.09千字
  • 约 7页
  • 2018-04-12 发布于安徽
  • 举报
* * 预备知识 #define MAXQSIZE 100 typedef struct Elemtype *base; int front; int rear; SqQueue; ●求队长 int QueueLength SqQueue Q return Q.rear-Q.front+ MAXQSIZE % MAXQSIZE ; ? ●入队列 Status EnQueue SqQueue Q, QElemType e if Q.rear+1 % MAXQSIZE Q.front return ERROR; Q.base[Q.rear] e; Q.rear Q.rear+1 % MAXQSIZE; return OK; ●出队列 Status DeQueue SqQueue Q, QElemType e if Q.rear Q.front return ERROR; e Q.base[Q.front]; Q.front Q.front+1 % MAXQSIZE; return OK; 第7次课 循环队列的实现 一、实验目的: 理解队列是操作受限(插入EnQueue,删除DeQueue)的线性

文档评论(0)

1亿VIP精品文档

相关文档