1 Star 0 Fork 0

绽风华/code

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SqQueue.h 555 Bytes
一键复制 编辑 原始数据 按行查看 历史
绽风华 提交于 2023-10-05 14:54 +08:00 . 数据结构——循环队列
#pragma once
#include<stdio.h>
#include<stdlib.h>
#include"../DataStructure/Person.h"
typedef Person QElemType;
#define MAXSIZE 100
//----队列的顺序存储结构------
typedef struct
{
QElemType* base; //存储空间的基地址
int front; //头指针
int rear; //尾指针
}SqQueue;
//循环队列的初始化
bool InitQueue(SqQueue& Q);
//求循环队列的长度
int QueueLength(SqQueue Q);
//循环队列的入队
bool EnQueue(SqQueue& Q, QElemType e);
//循环队列的出队
bool DeQueue(SqQueue& Q, QElemType& e);
//取循环队列的队头元素
bool GetHead(SqQueue Q,QElemType& e);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cmwlvip/code_test.git
git@gitee.com:cmwlvip/code_test.git
cmwlvip
code_test
code
master

搜索帮助