2012年5月8日

无回溯匹配模式

摘要: #include "stdio.h"#include "stdlib.h"struct SeqString { int MAXNUM; int n; char *c;};typedef struct SeqString * PSeqString;//创建空顺序串PSeqString createNullStr_Seq(int m){ PSeqString pstr=(PSeqString)malloc(sizeof(struct SeqString)); if(pstr!=NULL) { pstr->c=(char *)malloc(sizeo.. 阅读全文

posted @ 2012-05-08 23:46 yucong 阅读(559) 评论(0) 推荐(2)

朴素模式的匹配算法-顺序

摘要: 声明:#include "stdio.h"#include "stdlib.h"struct SeqString { int MAXNUM; int n; char *c;};typedef struct SeqString * PSeqString;//创建空顺序串PSeqString createNullStr_Seq(int m){ PSeqString pstr=(PSeqString)malloc(sizeof(struct SeqString)); if(pstr!=NULL) { pstr->c=(char *)malloc(si.. 阅读全文

posted @ 2012-05-08 20:38 yucong 阅读(279) 评论(0) 推荐(0)

链表的应用1_josephus问题

摘要: 声明:#include "stdio.h"#include "stdlib.h"#define FALSE 0#define TRUE 1typedef int DataType;struct Node;//单链表的结点类型typedef struct Node *PNode;//结点指针类型//单链表结点结构struct Node { DataType info; PNode link;};typedef struct Node *LinkList;typedef LinkList *PLinkList;2.初始化链表//用1,2,……,n为*pcli 阅读全文

posted @ 2012-05-08 15:01 yucong 阅读(222) 评论(0) 推荐(0)

导航