- 队列 (先进先出)
//队列(新建,出队,入队等操作)
typedef struct node
{
int data;
struct node *next;
}Node;
typedef struct myQueue
{
int size;
Node *front;
Node *rear;
}my_Queue;
#include <stdio.h>
#include <malloc.h>
#include <string.h>
my_Queue *create_queue()
{
my_Queue * t=NULL;
t=(my_Queue *)malloc(sizeof(my_Queue));
memset(t,0,sizeof(my_Queue));
t->front = NULL;
t->rear = NULL;
t->size = 0