- 博客(8)
- 收藏
- 关注
原创 折半插入排序
本程序在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 367
原创 折半查找
本程序在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 389
原创 关于顺序栈的初始化,进栈,出栈,栈满,栈空的操作
本程序在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 6131
原创 关于线性表的链式存储(链表)的创建,头插法,尾插法,删除链表结点的操作
本程序在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 1254
原创 归并排序
本程序在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 352
原创 直接插入排序
本程序在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 476
原创 堆排序
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 356
原创 关于有向图的邻接表的创建,深度遍历及广度遍历.
本程序在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 3745
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人