码迷,mamicode.com
首页 >  
搜索关键字:datastructure    ( 155个结果
_DataStructure_C_Impl:广义表的扩展线性链表存储
#include #include #include #include"SeqString.h" typedef char AtomType; typedef enum{ATOM,LIST} ElemTag;//ATOM=0,表示原子,LIST=1,表示子表 typedef struct GLNode{ ElemTag tag; //标志位tag用于区分元素是原子还是子表 union{ ...
分类:其他好文   时间:2015-08-08 18:18:27    阅读次数:122
_DataStructure_C_Impl:广义表头尾链表存储
#include #include #include #include"SeqString.h" typedef char AtomType; typedef enum{ATOM,LIST} ElemTag;//ATOM=0,表示原子,LIST=1,表示子表 typedef struct Node { ElemTag tag; /*标志位tag用于区分元素是原子还是子表*/ union...
分类:其他好文   时间:2015-08-08 18:18:16    阅读次数:119
_DataStructure_C_Impl:Array
#include #include #include #define MaxArraySize 2 typedef int DataType; typedef struct{ DataType *base; //数组元素的基地址 int dim; //数组的维数 int *bounds; //数组的每一维之间的界限的地址 int *constants; //数组存储映像常量基地址 }Ar...
分类:其他好文   时间:2015-08-08 06:46:42    阅读次数:216
_DataStructure_C_Impl:稀疏矩阵三元组
#include #include #define MaxSize 200 typedef int DataType; typedef struct{ //三元组类型定义 int i,j; DataType e; }Triple; typedef struct{ //矩阵类型定义 Triple data[MaxSize]; int rpos[MaxSize]; //用于存储三...
分类:其他好文   时间:2015-08-08 06:45:52    阅读次数:151
_DataStructure_C_Impl:链串
//_DataStructure_C_Impl:链串 #include #include #include #define ChunkSize 4 #define stuff '#' //串的结点类型定义 typedef struct Chunk{ char ch[ChunkSize]; struct Chunk *next; }Chunk; //链串的类型定义 typedef struct{...
分类:其他好文   时间:2015-08-07 01:54:43    阅读次数:136
_DataStructure_C_Impl:KMP模式匹配
#include #include #include #include"SeqString.h" /*函数的声明*/ int B_FIndex(SeqString S,int pos,SeqString T,int *count); int KMP_Index(SeqString S,int pos,SeqString T,int next[],int *count); void GetNext(...
分类:其他好文   时间:2015-08-07 01:53:36    阅读次数:221
_DataStructure_C_Impl:双端队列
//_DataStructure_C_Impl:双端队列 #include #include #define QueueSize 8 //定义双端队列的大小 typedef char DataType; typedef struct DQueue{ //双端队列的类型定义 DataType queue[QueueSize]; int end1,end2; //双端队列的队尾指针 }DQue...
分类:其他好文   时间:2015-08-06 07:10:43    阅读次数:114
_DataStructure_C_Impl:顺序串
#include #include #define MaxLength 60 typedef struct{ char str[MaxLength]; int length; }SeqString; //串的赋值操作 void StrAssign(SeqString *S,char cstr[]){ int i; for(i=0;cstr[i]!='\0';i++) S->str[i]...
分类:其他好文   时间:2015-08-06 07:10:22    阅读次数:131
_DataStructure_C_Impl:堆串
#include #include typedef struct{ char *str; int length; }HeapString; //串的赋值操作 void StrAssign(HeapString *S,char cstr[]){ int i=0,len; if(S->str) free(S->str); for(i=0;cstr[i]!='\0';i++); //求cs...
分类:其他好文   时间:2015-08-06 07:08:26    阅读次数:108
//_DataStructure_C_Impl:链式队列
//_DataStructure_C_Impl:链式队列 #include #include #define MaxSize 100 typedef int DataType; typedef struct QNode{ DataType data; struct QNode *next; }LQNode,*QueuePtr; typedef struct{ QueuePtr front; ...
分类:其他好文   时间:2015-08-06 07:08:26    阅读次数:110
155条   上一页 1 ... 8 9 10 11 12 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!