![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
不想飞的猫
不与生人论长短,不以人生论短长
展开
-
统一C语言风格定义各种数据结构及基本操作——顺序表基本操作
/*sqlist.h*/ #pragma once //实现顺序表常用操作代码 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #define INIT_SIZE 5 //线性表存储空间初始分配量 #define INCREASE_SIZE 10 //线性表存储空间分配增量 typedef int ElemType; //定义元素类型为int ty原创 2021-05-23 22:40:23 · 330 阅读 · 0 评论 -
统一C语言风格定义各种数据结构及基本操作——单链表基本操作
/*linklist.h*/ #pragma once #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> typedef int ElemType; //定义数据元素类型为int typedef struct LNode { //线性表的链式存储结构定义 ElemType data; struct LNode* next; }LNode, *LinkList; //建立带头节点的单链表L原创 2021-05-23 22:24:24 · 299 阅读 · 0 评论 -
统一C语言风格定义各种数据结构及基本操作——单向循环链表基本操作
/*cyclelinklist.h*/ #pragma once #include<stdio.h> #include<stdlib.h> typedef int ElemType; //定义数据元素类型为int typedef struct CLNode { //线性表的链式存储结构定义 ElemType data; struct CLNode* next; }CLNode, *CLinkList; //建立带头节点的单链表L,输入n个元素的值 CLinkList cre原创 2021-05-23 22:18:37 · 350 阅读 · 0 评论 -
统一C语言风格定义各种数据结构及基本操作——双向循环链表基本操作
/*doublecyclelinklist.h*/ #pragma once #include<stdio.h> #include<stdlib.h> typedef int ElemType; //定义数据元素类型为int typedef struct DCLNode { //双向循环链表存储结构定义 ElemType data; struct DCLNode* prior; struct DCLNode* next; }DCLNode, *DCLinkList; //原创 2021-05-23 22:12:16 · 279 阅读 · 0 评论 -
统一C语言风格定义各种数据结构及基本操作——栈基本操作
/*stack.h*/ #pragma once /* 采用顺序表存储栈中元素 */ #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #define STACK_INIT_SIZE 10 //初始化栈的容量 #define STACK_INCREASEMENT 2 //每次增加的栈的容量 typedef int ElemType; typedef struct SqS原创 2021-05-23 22:02:15 · 348 阅读 · 0 评论 -
统一C语言风格定义各种数据结构及基本操作——顺序队列基本操作
/*sqqueue.h*/ #pragma once #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #define QMAXSIZE 10 typedef int ElemType; typedef struct SqQueue { ElemType* base;//动态存储区 int front;//头指针 int rear;//尾指针 }SqQueue,*pSqQueue; //原创 2021-05-23 21:49:52 · 294 阅读 · 0 评论 -
统一C语言风格定义各种数据结构及基本操作——链队列基本操作
/*linkqueue.h*/ #pragma once #include<stdio.h> #include<stdlib.h> typedef int ElemType; typedef struct LNode { //线性表的链式存储结构定义 ElemType data; struct LNode* next; }LNode, *LinkList; typedef struct LinkQueue {//队列存储结构 LinkList front;//队头指针 Li原创 2021-05-23 21:43:29 · 334 阅读 · 0 评论 -
统一C语言风格定义各种数据结构及基本操作——二叉树基本操作
/*bittree.h*/ #pragma once #include<stdio.h> #include<stdlib.h> #define MAXNODE 10 typedef int ElemType; typedef struct BitNode {//二叉树存储结构定义 ElemType data; struct BitNode *lchild, *rchild; }BitNode,*BitTree; //初始化空树,1表示初始化成功,0表示初始化失败 int ini原创 2021-05-23 21:32:58 · 367 阅读 · 0 评论