数据结构
CaediosViolet
这个作者很懒,什么都没留下…
展开
-
数据结构-树-C语言-堆
#include <stdio.h> #include <stdlib.h> typedef struct HeapStruct *pHeap;//pHeap为结构指针,指向这个结构 struct HeapStruct原创 2018-10-29 20:28:40 · 131 阅读 · 0 评论 -
数据结构-树-C语言-HaffmanTree
数据结构-树-HaffmanTree typedef struct TreeNode *pHaffmanTree struct TreeNode{ int weight;//权重 pHaffmanTree left,right;//左右子树 } pHaffmanTree createHaffmanTree(MinHeap heap){ int i; pHaffmanTree temp; ...原创 2018-10-29 20:31:56 · 140 阅读 · 0 评论 -
数据结构-图-C语言-邻接矩阵
数据结构-图-邻接矩阵 正式写法 #include <stdio.h> #include <stdlib.h> #define MaxVertexNum 50 typedef int WeightType; typedef int Vertex; typedef int DataType; /*图*/ typedef struct原创 2018-10-29 20:27:50 · 323 阅读 · 0 评论 -
数据结构-图-C语言-邻接表
数据结构-图-C语言-邻接表 #include <stdio.h> #include <stdlib.h> #define Max 100 typedef int Vertex; typedef int WeightType; typedef struct GNode *pGNode; struct GNode { int nv; int ne; Ad原创 2018-10-29 21:42:44 · 351 阅读 · 0 评论 -
数据结构-图-C语言-邻接表-图的遍历
数据结构-图-C语言-邻接表-图的遍历 所需的结构 typedef int Vertex; typedef int WeightType; typedef struct GNode *pGNode; struct GNode { int nv; int ne; AdjList g; }; typedef pGNode LGraph; /*边*/ typedef struct ENode ...原创 2018-10-30 17:12:07 · 961 阅读 · 0 评论 -
数据结构-图-C语言-邻接矩阵-图的遍历
数据结构-图-C语言-邻接矩阵-图的遍历 bool visited[999]; void visit(Vertex V) { printf("正在访问顶点%d\n", V); } bool isEdge(MGraph graph, Vertex v, Vertex w) { return graph->G[v][w] > 0; } void BFS(Vertex start,...原创 2018-10-30 20:12:24 · 863 阅读 · 0 评论