26 lines
356 B
C
26 lines
356 B
C
//LinkQueue.h
|
|
|
|
#ifndef LINKQUEUE_H
|
|
#define LINKQUEUE_H
|
|
|
|
typedef struct Node {
|
|
int data;
|
|
Node *next;
|
|
} Node, *LinkList;
|
|
|
|
typedef struct {
|
|
LinkList list;
|
|
Node *front;
|
|
Node *rear;
|
|
} linkQueue;
|
|
|
|
void initQueue(linkQueue &q);
|
|
|
|
bool isEmpty(linkQueue &q);
|
|
|
|
bool enQueue(linkQueue &q, int e);
|
|
|
|
int deQueue(linkQueue &q);
|
|
|
|
#endif //LINKQUEUE_H
|