数据结构(C语言)
文章平均质量分 63
lim911208
这个作者很懒,什么都没留下…
展开
-
堆排序
heapsort.h文件 #include #include #define TRUE 1 #define FALSE 0 typedef int keyType; typedef int otherType; typedef struct{ keyType key; otherType other_data; }Record; heaps原创 2014-03-11 13:11:56 · 355 阅读 · 0 评论 -
关于有向图的邻接表的创建,深度遍历及广度遍历.
本程序在VC环境中运行。 首先是头文件(tbl.h文件)。关于图的邻接表的定义。 #include #include #include #define N 10 #define INFINITY 32768 #define True 1 #define False 0 #define Error -1 #define Ok 1 typedef enum{DG原创 2014-03-10 20:24:30 · 3743 阅读 · 0 评论 -
归并排序
本程序在VC环境下运行。 mergesort.h文件 #include #include typedef int keyType; typedef int otherType; typedef struct{ keyType key; otherType other_data; }Record; mergesort.cpp文件 #include "原创 2014-03-11 17:37:28 · 351 阅读 · 0 评论 -
关于线性表的链式存储(链表)的创建,头插法,尾插法,删除链表结点的操作
本程序在VC环境下运行。 linklist.h文件。 #include #include typedef int ElemType; #define True 1 #define False 0 typedef struct Node{ ElemType data; struct Node *next; }Node,*linklist; l原创 2014-03-12 23:00:44 · 1253 阅读 · 0 评论 -
直接插入排序
本程序在VC环境下运行。 inssort.h文件 #include #include typedef int keyType; typedef int otherType; typedef struct{ keyType key; otherType otherdata; }Record; inssort.cpp文件 #include "insso原创 2014-03-11 17:28:47 · 475 阅读 · 0 评论 -
关于顺序栈的初始化,进栈,出栈,栈满,栈空的操作
本程序在VC环境下运行。顺序栈比较简单。本程序只是插入一个数据之后直接删除该数据。不够完善请原谅。 seqstack.h文件。 #include #include #define MAXSIZE 50 #define False 0; #define True 1; typedef struct{ int data[MAXSIZE]; int to原创 2014-03-13 22:41:42 · 6130 阅读 · 0 评论 -
折半查找
本程序在VC环境下运行。折半查找需待查找的序列是有序的。 binsearch.h文件。 #include #include #define RECORDSIZE 20 typedef int keyType; typedef int otherType; typedef struct{ keyType key; otherType otherdata;原创 2014-03-16 13:35:10 · 388 阅读 · 0 评论 -
折半插入排序
本程序在VC环境下运行。 binsort.h文件。 #include #include typedef int keyType; typedef int otherType; typedef struct{ keyType key; otherType otherdata; }Record; binsort.cpp文件。 #include "bin原创 2014-03-16 18:39:02 · 366 阅读 · 0 评论