摘要: 用两个栈来实现一个队列,完成队列的Push和Pop操作。 队列中的元素为int类型。 阅读全文
posted @ 2017-07-20 17:36 Cloud_strife 阅读(800) 评论(0) 推荐(0) 编辑
摘要: 剑指offer的面试题7.用两个栈来实现队列 #include <stdio.h>#include <string.h> #define MAX 1000typedef struct Stacks{ int date[MAX]; int top;}Stack; Stack stack1,stack2 阅读全文
posted @ 2017-07-20 16:55 Cloud_strife 阅读(715) 评论(0) 推荐(0) 编辑
摘要: 复习C语言数组队列 #include <stdio.h>#include <string.h> #define MAX 1000 typedef struct Queues{ int date[MAX]; int front; int rear;}Queue; Queue queue; void C 阅读全文
posted @ 2017-07-20 16:15 Cloud_strife 阅读(2498) 评论(0) 推荐(1) 编辑
摘要: 创建了一个C语言链表和栈。包含输入数据在链表中,保存在栈里,再从栈里读取出来。 #include <stdio.h>#include <string.h> #define MAX 1000 typedef struct node{ int value; struct node *next;}Node 阅读全文
posted @ 2017-07-20 14:35 Cloud_strife 阅读(242) 评论(0) 推荐(0) 编辑