登录
首页 » 算法 » 顺序队列C实现

顺序队列C实现

于 2022-08-13 发布 文件大小:1.52 kB
0 117
下载积分: 2 下载次数: 1

代码说明:

#include "stdio.h"    #include "stdlib.h"   #include "io.h"  #include "math.h"  #include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE 20 /* 存储空间初始分配量 */typedef int Status; typedef int QElemType; /* QElemType类型根据实际情况而定,这里假设为int *//* 循环队列的顺序存储结构 */typedef struct{ QElemType data[MAXSIZE]; int front;     /* 头指针 */ int rear;  /* 尾指针,若队列不空,指向队列尾元素的下一个位置 */}SqQueue;Status visit(QElemType c){ printf("%d ",c); return OK;}/* 初始化一个空队列Q */Status Init

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 105540会员总数
  • 37今日下载