
数据结构
文章平均质量分 84
阿茶大人
技术小白
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
顺序表的就地逆置
线性表中的顺序表逆置算法: 假设有10个元素,在申请空间的时候需要申请11个位置(注意:一维数组中有结束符,所以多申请一位空间), 在逆置过程中需要考虑到申请12位空间 10 20 30 40 逆置时: 10 20 30 40 先将所有项向后移动一位: 10 20 30 40 将最后一位的值附在第一位上...原创 2018-09-26 12:00:26 · 1068 阅读 · 0 评论 -
(数据结构、C语言)邻接表的建立、插入、输出、深度遍历、宽度遍历
#include<stdio.h> #include<stdlib.h> #define ERROR 0 #define OK 1 #define Overflow 2 #define Underflow 3 #define NotPresent 4 #define Duplicate 5 typedef int ElemType; typedef struct eNode...原创 2018-06-21 21:03:31 · 630 阅读 · 0 评论 -
(C语言、数据结构)邻接矩阵的建立、插入、输出、深度遍历、宽度遍历
#define ERROR 0 #define OK 1 #define Overflow 2 #define Underflow 3 #define NotPresent 4 #define Duplicate 5 typedef int ElemType; typedef struct { ElemType **a; //邻接矩阵 int n; ...原创 2018-06-21 21:01:30 · 1055 阅读 · 0 评论 -
(C语言、数据结构)邻接矩阵的初始化、边的插入和输出,以及邻接矩阵的撤销和边的搜索
#include<stdio.h> #include<stdlib.h> #define ERROR 0 #define OK 1 #define Overflow 2 #define Underflow 3 #define NotPresent 4 #define Duplicate 5 typedef int ElemType; typedef struct { Ele...原创 2018-06-17 16:39:11 · 5601 阅读 · 0 评论 -
C语言实现一元多项式的创建、相加
#include<stdio.h> #include<string.h> #include<stdlib.h> #define ERROR 0 #define OK 1 typedef struct pNode //建立一元多项式 { int coef; //系数 int exp;//...原创 2018-05-28 17:51:51 · 9803 阅读 · 1 评论 -
C语言实现带表头结点单链表的初始化、查找、插入、删除、输出、撤销等操作
#include<stdlib.h> #include<stdio.h> #define ERROR 0 #define OK 1 typedef int ElemType; //建立带表头结点的单链表 typedef struct node { ElemType element; struct node *link; ...原创 2018-05-28 17:06:53 · 8402 阅读 · 0 评论 -
c语言 完成顺序表的创建、初始化、查找、插入、删除、输出、撤销等操作
#include<stdio.h> #include<stdlib.h> #define ERROR 0 #define OK 1 #define overflow 2 //表示上溢 #define underflow 3 //表...原创 2018-05-28 16:55:06 · 10085 阅读 · 0 评论 -
二叉树的先序创建,先序遍历、中序遍历、后序遍历、全部结点数、二叉树深度、叶子结点数、二叉树左右子树交换
#include<stdlib.h> #include<stdio.h> #include<conio.h> typedef char t; //定义数据类型 typedef struct BinaryTreeNode { t Data; struct BinaryTreeNode *L...原创 2018-05-28 16:41:59 · 4627 阅读 · 1 评论