- 博客(4)
- 收藏
- 关注
原创 KMP Python
next = [] s = 'aaaaab' t = 'aaaab' def getnext(): next.append(-1) i = 0; j = -1 while i < len(t) - 1: if j == -1 or t[i] == t[j]: i += 1; j += 1 if t[i] ==
2012-12-06 19:22:38
179
原创 KMP算法
#include #include #include #define MAXN 255 typedef char SString[MAXN + 1]; int next[1 << 8]; void get_nextval(SString t) { int i = 1, j = 0; next [1] = 0; while (i < t[0]) {
2012-11-29 21:56:06
139
原创 枚举法求迷宫
#include #include #define OK 1 #define ERROR 0 #define STACK_INIT_SIZE 100 typedef int Status; typedef struct { int x, y; } PosType; typedef struct { int ord; PosType seat; int d
2012-11-29 21:49:50
178
原创 C语言 链表
#include #include #define OK 1 #define ERROR 0 typedef int Status; typedef int ElemType; typedef struct List { ElemType Data; struct List *next; } LNode, *LinkList; /* 求链表的长度 */ Status L
2012-11-29 21:27:17
156
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人