queue.c

来自「压缩包里面的都是精致的基本C语言小程序」· C语言 代码 · 共 38 行

C
38
字号
#include "mystdlib.h"#include "linkedList.h"#include "queue.h"struct queue{  linkedList l;};queue newQueue (){  queue q = checkedMalloc (sizeof (*q));  q->l = newLinkedList ();    return q;}int queueIsEmpty (queue q){  return linkedListIsEmpty (q->l);}void enQueue (queue q, poly x){  linkedListInsertTail (q->l, x);  return;}poly deQueue (queue q){  return linkedListDeleteHead (q->l);}int queueSize (queue q){  return linkedListSize (q->l);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?