没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
/********************************************************************
created: 2006/07/02
filename: KMP.cpp
author: 李创
http://www.cppblog.com/converse/
参考资料: 严蔚敏<<数据结构>>
purpose: KMP字符串匹配算法的演示
*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#define MAX_LEN_OF_STR 30 // 字符串的最大长度
typedef struct String // 这里需要的字符串数组,存放字符串及其长度
{
char str[MAX_LEN_OF_STR]; // 字符数组
int length; // 字符串的实际长度
}String, *PString;
// 得到字符串的next数组
void GetNextArray(PString pstr, int next[])
{
assert(NULL != pstr);
assert(NULL != next);
assert(pstr->length > 0);
created: 2006/07/02
filename: KMP.cpp
author: 李创
http://www.cppblog.com/converse/
参考资料: 严蔚敏<<数据结构>>
purpose: KMP字符串匹配算法的演示
*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#define MAX_LEN_OF_STR 30 // 字符串的最大长度
typedef struct String // 这里需要的字符串数组,存放字符串及其长度
{
char str[MAX_LEN_OF_STR]; // 字符数组
int length; // 字符串的实际长度
}String, *PString;
// 得到字符串的next数组
void GetNextArray(PString pstr, int next[])
{
assert(NULL != pstr);
assert(NULL != next);
assert(pstr->length > 0);
资源评论
feizigegeyeye
- 粉丝: 11
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功