#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
#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
#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
#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:链串
#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
#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:双端队列
#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
#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
#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:链式队列
#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