-
Notifications
You must be signed in to change notification settings - Fork 0
/
SqQueue.h
41 lines (36 loc) · 947 Bytes
/
SqQueue.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* =====================================================================================
*
* Filename: SqQueue.h
*
* Description: 顺序存储循环队列
*
* Version: 1.0
* Created: 11/30/2014 10:57:21 AM
* Revision: none
* Compiler: gcc
*
* Author: 张世龙 (mn), [email protected]
* Company: free
*
* =====================================================================================
*/
#ifndef GIT_JCOMMON_SQQUEUE_H
#define GIT_JCOMMON_SQQUEUE_H
#define MAXSIZE 200
typedef int ElemType;
typedef struct
{
ElemType data[MAXSIZE];
int front;
int rear;
}SqQueue;
void InitQueue(SqQueue *queue);
void DestoryQueue(SqQueue *queue);
void ClearQueue(SqQueue *queue);
int QueueEmpty(SqQueue *queue);
int GetHead(SqQueue *queue,ElemType *e);
int EnQueue(SqQueue *queue,ElemType *e);
int DeQueue(SqQueue *queue,ElemType *e);
int QueueLength(SqQueue *queue);
#endif