- 博客(79)
- 收藏
- 关注
原创 数据结构课程设计校园导游(吃货版)
/******************************* *版权所有 (c)2015.wangchao *文件名称 :main.cpp *文件标识:无 *内容摘要:无 *其他说明:无 *当前版本:V1.0 *作者 :王超 *完成日期:20151215 *修改内容:无 ********************************/ /***********************
2015-12-25 16:20:44 1352 1
原创 学期总结
首先要跟老师说声对不起,忘记了发这个的时间,这个学期过得很快,一眨眼,就要结束了。学了一个学期,说实话,期间有偷懒过,但是感觉这种新颖的课堂模式所产生的效果远远好于传统的课堂。 数据结构的书很沉!这是我背了一个学期的第一个感受,我原本以为,大一的C++就是一种“境界”了。。。看到这个,我就呵呵了。从一开始,我是真的不知道这本书要学什么,开始几次的上机课就是发博客,我还以为这门课的最终考试就是
2015-12-21 18:46:27 781 1
原创 十六周 英文单词的基数排序
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月18日 问题描述:英文单词的基数排序 */ #include #include #include #define MaxLen 9 //单词的最大长度 #define Radix 27 //基数rd为27
2015-12-18 08:52:56 643
原创 十六周 归并排序算法的改进
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月18日 问题描述:归并排序算法的改进 */ #include #include #include #include #define MinLength 64 //最短分段长度 typedef int KeyType; //定义关键字类型
2015-12-18 08:40:08 435
原创 十六周 项目1 归并排序
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月14日 问题描述:归并排序 */ #include #include #define MaxSize 20 typedef int KeyType; //定义关键字类型 typedef char InfoType[10]; typedef struct
2015-12-14 17:15:49 320
原创 十六周 项目1 基数排序
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月14日 问题描述:基数排序 */ #include #include #include #define MAXE 20 //线性表中最多元素个数 #define MAXR 10 //基数的最大取值 #define MAXD 8
2015-12-14 17:13:43 337
原创 十六周 项目1 堆排序
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月14日 问题描述:堆排序 */ #include #define MaxSize 20 typedef int KeyType; //定义关键字类型 typedef char InfoType[10]; typedef struct //记录类
2015-12-14 17:05:43 321
原创 十六周 项目1 快速排序
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月14日 问题描述:快速排序,以中间位置元素为基准 */ #include #define MaxSize 20 typedef int KeyType; //定义关键字类型 typedef char InfoType[10]; typedef struct
2015-12-14 16:44:18 362
原创 十六周 项目1希尔排序
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月14日 问题描述:希尔排序 */ #include #define MaxSize 20 typedef int KeyType; //定义关键字类型 typedef char InfoType[10]; typedef struct //记
2015-12-14 16:30:09 321
原创 十六周 项目1直接插入排序
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月14日 问题描述:直接插入排序 */ #include #define MaxSize 20 typedef int KeyType; //定义关键字类型 typedef char InfoType[10]; typedef struct /
2015-12-14 16:26:09 401
原创 第15周 项目 3-B-树的基本操作
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月7日 问题描述:B-树的基本操作 */ #include #include #define MAXM 10 //定义B-树的最大的阶数 typedef int KeyType; //KeyType为
2015-12-07 16:49:25 408
原创 第15周 项目2-哈希法组织关键字 链地址法
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月7日 问题描述:用哈希法组织关键字 链地址法 */ #include #include #include #define N 15 #define M 26 typedef struct node //定义哈希链表的节点类型 { char *ke
2015-12-07 16:43:20 431
原创 第15周 项目2-哈希法组织关键字 线性探测法
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月7日 问题描述:用哈希法组织关键字 线性探测法 */ #include #include #define N 15 #define M 26 int H(char *s) { return ((*s-'a'+1)%M); } int main()
2015-12-07 16:41:02 438
原创 十五周 项目1 - 验证算法
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月7日 问题描述:验证算法 */ #include #define MaxSize 100 //定义最大哈希表长度 #define NULLKEY -1 //定义空关键字值 #define DELKEY -2 //定义
2015-12-07 16:22:23 362
原创 十四周 项目三-是否二叉排序树
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年12月4日 问题描述:是否二叉排序树 */ #include #include #define MaxSize 100 typedef int KeyType; //定义关键字类型 typedef char InfoType; typ
2015-12-04 08:14:19 399
原创 十四周 项目二-二叉树排序树中查找的路径
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月30日 问题描述:二叉树排序树中查找的路径 */ #include #include #define MaxSize 100 typedef int KeyType; //定义关键字类型 typedef char InfoType;
2015-11-30 17:25:44 332
原创 十四周 项目1-4 验证算法
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月30日 问题描述:验证算法 */ #include #include typedef int KeyType; //定义关键字类型 typedef char InfoType; typedef struct node
2015-11-30 17:15:12 357
原创 十四周 项目1-3 验证算法
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月30日 问题描述:验证算法 */ #include #include typedef int KeyType; typedef char InfoType[10]; typedef struct node //记录类型 { K
2015-11-30 17:08:10 296
原创 十四周 项目1-2 分块查找
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月30日 问题描述:分块查找 */ #include #define MAXL 100 //数据表的最大长度 #define MAXI 20 //索引表的最大长度 typedef int KeyType; typedef char InfoType[10];
2015-11-30 16:59:07 370
原创 十四周 项目一-折半查找
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月30日 问题描述:折半查找 */ #include #define MAXL 100 typedef int KeyType; typedef char InfoType[10]; typedef struct { KeyType key;
2015-11-30 16:25:53 413
原创 十三周 项目5-拓扑排序算法验证
#include #include #include "graph.h" void TopSort(ALGraph *G) { int i,j; int St[MAXV],top=-1; //栈St的指针为top ArcNode *p; for (i=0; in; i++) //入度置初值0
2015-11-23 17:14:30 366
原创 十三周 项目4-Floyd算法验证
文件名称:main.cpp 作者 :王超 完成日期:2015年11月23日 问题描述:Floyd算法验证 */ #include #include #include "graph.h" #define MaxSize 100 void Ppath(int path[][MAXV],int i,int j) //前向递归查找路径上的顶点 {
2015-11-23 17:12:50 401
原创 十三周 项目3-Dijkstra算法的验证
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月23日 问题描述:Dijkstra算法的验证 */ #include #include #include "graph.h" #define MaxSize 100 void Ppath(int path[],int i,int v) //前向递归查找路径上的顶点
2015-11-23 17:03:11 383
原创 十三周 项目2-Kruskal算法的验证
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月23日 问题描述:Kruskal算法的验证 */ #include #include #include "graph.h" #define MaxSize 100 typedef struct { int u; //边的起始顶点 in
2015-11-23 16:56:00 374
原创 十三周 项目1-Prim算法的验证
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月23日 问题描述: Prim算法的验证 */ #include #include #include "graph.h" int main() { MGraph g; int A[6][6]= { {0,6,1,5,INF
2015-11-23 16:19:55 351
原创 十二周 项目4- 利用遍历思想求解图问题
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月20日 问题描述输出所有路径 : */ #include #include #include "graph.h" int visited[MAXV]; //定义存放节点的访问标志的全局数组 void FindPaths(ALGraph *G,in
2015-11-20 08:23:27 433
原创 十二周 项目2-操作用邻接表存储的图
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月20日 问题描述:假设图G采用邻接表存储,分别设计实现以下要求的算法: (1)输出出图G中每个顶点的出度; (2)求出图G中出度最大的一个顶点,输出该顶点编号; (3)计算图G中出度为0的顶点数; (4)判断图G中是否存在边 。 */ #include #i
2015-11-20 08:20:06 438
原创 十二周 项目1-图基本算法库
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月20日 问题描述:定义图的邻接矩阵和邻接表存储结构,实现其基本运算,并完成测试。 */ #include #include #include "graph.h" int main() { MGraph g1,g2; ALGraph *G1,*G
2015-11-20 08:09:07 397
原创 第十一周 项目1-4哈夫曼树
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月11日 问题描述:哈夫曼树 */ #include #include #define N 50 //叶子结点数 #define M 2*N-1 //树中结点总数 //哈夫曼树的节点结构类型 typedef struct {
2015-11-11 18:00:28 587
原创 第十一周 项目1-3 线索化二叉树
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月9日 问题描述:线索化二叉树 */ #include #include #define MaxSize 100 typedef char ElemType; typedef struct node { ElemType data; int ltag
2015-11-09 17:17:22 420
原创 第十一周 项目1-2 二叉树的构造
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月9日 问题描述:二叉树的构造 */ #include #include #include "btree.h" int main() { ElemType pre[]="ABDGCEF",in[]="DGBAECF"; BTNode *b1
2015-11-09 16:58:47 574
原创 第十一周 项目1-1二叉树的层次遍历算法
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月9日 问题描述:实现二叉树的层次遍历算法,并对用”A(B(D,E(H(J,K(L,M(,N))))),C(F,G(,I)))”创建的二叉树进行测试 */ #include #include "btree.h" int main() { BTNode *b;
2015-11-09 16:19:31 380
原创 第十周 项目3-5 判断二叉树是否相似
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月6日 问题描述:判断二叉树是否相似*/ #include #include "btree.h" int main() { BTNode *b1, *b2, *b3; CreateBTNode(b1,"B(D,E(H(J,K(L,M(,N)))))");
2015-11-06 08:32:25 539
原创 第十周 项目3-4返回二叉链b中data值为x的节点的层数
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月6日 问题描述:算法Level(b,x,h),返回二叉链b中data值为x的节点的层数。 */ #include #include "btree.h" int main() { BTNode *b; CreateBTNode(b,"A(B(D,E(H
2015-11-06 08:28:25 755
原创 第十周 项目3-3-求二叉树b的叶子节点个数
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月2日 问题描述:求二叉树b的叶子节点个数 */
2015-11-02 17:29:14 1086
原创 第十周 项目3-2-输出所有叶子节点
* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月2日 问题描述:输出所有叶子节点 */ #include #include "btree.h" int main() { BTNode *b; CreateBTNode(b,"A(B(D,E(H(J,K(L,M(,N))))),C(F,G(,I)))"
2015-11-02 17:15:31 559
原创 第十周 项目3-1-计算二叉树节点个数
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月2日 问题描述:计算二叉树节点个数 */ #include #include "btree.h" int main() { BTNode *b; CreateBTNode(b,"A(B(D,E(H(J,K(L,M(,N))))),C(F,G(,I))
2015-11-02 17:05:02 421
原创 第十周 项目2-二叉树遍历的递归算法
/* 文件名称:main.cpp作者 :王超完成日期:2015年11月2日问题描述:二叉树遍历的递归算法*/#include #include #include "btree.h" void PreOrder(BTNode *b) //先序遍历的递归算法 { if (b!=NULL) { printf("%c ",b->data);
2015-11-02 16:50:31 398
原创 第十周 项目1-二叉树算法库
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年11月2日 问题描述:二叉树算法库 */ #include #include "btree.h" int main() { BTNode *b,*p,*lp,*rp;; printf(" (1)创建二叉树:"); CreateBTNode(b,"
2015-11-02 16:29:41 460
原创 第九周 项目2-2 压缩存储的对称矩阵的运算
/* 文件名称:main.cpp 作者 :王超 完成日期:2015年10月26日 问题描述:实现两个用压缩形式存储的对称矩阵A和B的加法和乘法。*/ #include #define N 4 #define M 10 int value(int a[],int i,int j) { if (i>=j) return a[(
2015-10-26 17:14:08 498
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人