首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 顺序队列C实现

顺序队列C实现

  • 资源大小:1.52 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 算法 c 实现 顺序 队列

资 源 简 介

#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

文 件 列 表

顺序队列
顺序队列_Queue.c
VIP VIP
0.205931s