![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 67
q1522237765
这个作者很懒,什么都没留下…
展开
-
1213
void dbubble(sqlist r)//双向冒泡,排序元素r[1]~r[n] { int i=1,j,b=1; struct rec t; while(b) { b=0; for(j=n-i+1;j>=i+1;j--) if(r[j].key<r[j-1].key) {原创 2013-12-13 15:03:36 · 557 阅读 · 0 评论 -
1214
int visited[MAXVEX],A[MAXVEX]; void dfs1(AdjList *q,int vi,int vj,int l,int d) { int v,i; ArcNode *p; visited[vi]=1; d++; A[d]=vi; if(vi==vj&&d==1) { printf(" 一条路径:原创 2013-12-14 00:05:56 · 698 阅读 · 0 评论 -
12131
typedef struct { ElemType data; KeyType key; } void countsort(listtype a[],listtype b[],int n) { int i,j,count; for(i=0;i<=0;i++) { count=0; for(j=0;j<=n;j++)原创 2013-12-13 16:16:41 · 575 阅读 · 0 评论 -
数据结构的学习
//邻接表存储结构定义 #define MAXVEX 100 struct ArcNode { int adjvex; char info; struct AecNode *nextarc; }; struct vexnode { char data; struct ArcNode*firstarc; }; typedef struct vexnode Ad原创 2013-12-16 01:07:37 · 637 阅读 · 0 评论 -
欧拉回路
#include #include #include #include #include using namespace std; const unsigned MaxJunc = 45; const unsigned MaxStreet = 1995; unsigned graph[MaxJunc][MaxStreet]; unsigned stack[MaxStreet]; unsigned原创 2013-12-19 00:24:49 · 528 阅读 · 0 评论 -
建立哈夫曼树
#include #include #include typedef struct { int weight; char ch; int parent,lchild,rchild; }HTNode,*HuffmanCode; void welcome(); void HuffmanCoding(HuffmanTree&,char*,int*,int); void sel原创 2013-12-16 23:15:39 · 911 阅读 · 0 评论