_DataStructure_C_Impl:SeqListBasedSort】的更多相关文章

// _DataStructure_C_Impl:Sort #include<stdio.h> #include<stdlib.h> #define MaxSize 50 typedef int KeyType; //数据元素类型定义 typedef struct{ KeyType key; //keyword }DataType; //顺序表类型定义 typedef struct{ DataType data[MaxSize]; int length; }SqList; //--…
//_DataStructure_C_Impl:邻接矩阵 #include<stdio.h> #include<stdlib.h> #include<string.h> typedef char VertexType[4]; typedef char InfoPtr; typedef int VRType; #define INFINITY 10000 //定义一个无限大的值 #define MaxSize 50 //最大顶点个数 typedef enum{DG,DN,…
//_DataStructure_C_Impl:链串 #include<stdio.h> #include<stdlib.h> #include<string.h> #define ChunkSize 4 #define stuff '#' //串的结点类型定义 typedef struct Chunk{ char ch[ChunkSize]; struct Chunk *next; }Chunk; //链串的类型定义 typedef struct{ Chunk *he…
//_DataStructure_C_Impl:CriticalPath #include<stdio.h> #include<stdlib.h> #include<string.h> #include"SeqStack.h" //图的邻接表类型定义 typedef char VertexType[4]; typedef int InfoPtr; //定义为整型,为了存放权值 typedef int VRType; #define MaxSize 5…
// _DataStructure_C_Impl:Dijkstra #include<stdio.h> #include<stdlib.h> #include<string.h> typedef char VertexType[4]; typedef char InfoPtr; typedef int VRType; #define INFINITY 100000 //定义一个无限大的值 #define MaxSize 50 //最大顶点个数 typedef int P…
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef char VertexType[4]; typedef char InfoPtr; typedef int VRType; #define INFINITY 10000 //定义一个无限大的值 #define MaxSize 50 //最大顶点个数 typedef enum{DG,DN,UG,UN}GraphKind; //图的类型:有向图.有…
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef char VertexType[4]; typedef char InfoPtr; typedef int VRType; #define INFINITY 100000 //定义一个无限大的值 #define MaxSize 50 //最大顶点个数 typedef int PathMatrix[MaxSize][MaxSize][MaxSiz…
#include<stdio.h> #include<stdlib.h> #include<string.h> //图的邻接表类型定义 typedef char VertexType[4]; typedef char InfoPtr; typedef int VRType; #define INFINITY 10000 //定义一个无限大的值 #define MaxSize 50 //最大顶点个数 typedef enum{DG,DN,UG,UN}GraphKind;…
#pragma once #include<stdio.h> #include<stdlib.h> #define StackSize 100 typedef int DataType; //栈元素类型定义 typedef struct{ DataType stack[StackSize]; int top; }SeqStack; //将栈初始化为空栈仅仅须要把栈顶指针top置为 void InitStack(SeqStack *S){ S->top=0;//把栈顶指针置为0…
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #define MaxNumKey 6 /*keyword项数的最大值*/ #define Radix 10 /*keyword基数,此时是十进制整数的基数*/ #define MaxSize 1000 #define N 6 typedef int KeyType; /*定义keyword类型*/ typedef…