完成了顺序和链式的队列

This commit is contained in:
lzy
2024-04-17 15:12:21 +08:00
parent f13a690864
commit 9fd115d30b
10 changed files with 469 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#ifndef QUEUE_H__
#define QUEUE_H__
#define MAXSIZE 5
typedef int datatype;
typedef struct node_st
{
datatype data[MAXSIZE];
int head, tail;
} queue;
queue *qu_create();
int qu_isempty();
int qu_enqueue(queue *, datatype *);
int qu_dequeue(queue *, datatype *);
void qu_travel(queue *);
void qu_clear(queue *);
void qu_destroy(queue *);
#endif