![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c
久曌
擅长crud
展开
-
基于c的队列
队列就好比是排队,进行的是先进先出的操作,代码如下: #include <stdio.h> #include <stdlib.h> #define ERROR 0 #define OK 1 #define SIZE 7 typedef int ELEM; //元素定义 typedef struct queue { ELEM *elem; //elem做循环数组首...原创 2020-03-25 14:30:06 · 100 阅读 · 0 评论 -
动态栈(数组)
用数组实现进栈和出栈 #include <stdlib.h> #include <stdio.h> #define MAX_SIZE 100 #define INCREASE 10 #define OK 1 #define ERROR 0 typedef int ELEM; typedef struct Node { ELEM * elem; int l...原创 2020-03-22 12:09:16 · 159 阅读 · 1 评论 -
动态栈——链栈
内核为链表,将链表一些功能砍了。 1.栈的功能主要是进栈和出栈 2.栈实现先进后出 下面是灵魂画手的演示: 进栈: 出栈: 代码如下: #include <stdio.h> #include <stdlib.h> #define OK 1 #define ERROR 0 typedef int ELEM;//元素类型 typedef struct sqlist { ...原创 2020-03-21 16:55:21 · 216 阅读 · 0 评论 -
c写的单链表
完成了一些单链表**增删改查**的操作: 1.单链表是一种离散型存储 2.单链表由两部分组成: a.链表元素 b.链表节点类型指针 3.由链表节点类型指针指向下一节点。 4.节点无后继,则链表节点类型指针为NULL。 具体代码如下: #include <stdlib.h> #include <stdio.h> #define ERROR 0; #define OK ...原创 2020-03-19 18:14:58 · 76 阅读 · 0 评论