随笔分类 -  数据结构之队列

摘要:#include<stdio.h>#include<iostream>#include<malloc.h>#include<stdlib.h>#include<string.h>using namespace std;#define maxsize 60typedef struct node{ in 阅读全文
posted @ 2017-03-24 13:53 mykonons 阅读(1638) 评论(0) 推荐(0)
摘要:#include<stdio.h>#include<iostream>#include<malloc.h>#include<stdlib.h>#include<string.h>using namespace std;#define maxsize 60typedef struct node{ in 阅读全文
posted @ 2017-03-24 13:49 mykonons 阅读(4032) 评论(0) 推荐(0)
摘要:/*链式队列其实就是一种特殊的单链表 只要单链表和结构体的知识咂实 就能很轻松的实现*/ #include<stdio.h>#include<stdlib.h>#include<malloc.h>static int c=0;typedef struct node{ int data; struct 阅读全文
posted @ 2016-09-15 02:22 mykonons 阅读(201) 评论(0) 推荐(0)
摘要:#include<stdio.h>#include<malloc.h> #define max 10 typedef struct node{int queue[max];int front,rear;}q,*queue;void init(queue p){p->front=-1;p->rear= 阅读全文
posted @ 2016-09-14 03:10 mykonons 阅读(178) 评论(0) 推荐(0)
摘要:#include<stdio.h>#include<malloc.h> #define max 100typedef struct node{ int queue[max]; int front,rear;}q,*queue;void init(queue p){ p->front=-1; p->r 阅读全文
posted @ 2016-09-14 02:23 mykonons 阅读(160) 评论(0) 推荐(0)