2012年2月20日

KMPmatch 字符串模式匹配

摘要: O(m+n)计算后缀数组时,子串进行的也是模式匹配。/* KMP match */# include <stdio.h># include <string.h># include <stdlib.h>/* P in T */int KMPmatch(char *T, char *P){ int n, m; int i, j, k, *next; n = strlen(T); m = strlen(P); next = (int *)malloc((m-1)*sizeof(int)); /* compute postfix : next[] */ nex... 阅读全文

posted @ 2012-02-20 21:39 getgoing 阅读(318) 评论(0) 推荐(0) 编辑

转载:ZOJ POJ 题目分类(lonelycatcher)

摘要: 原文链接:http://www.cnblogs.com/lonelycatcher/archive/2011/08/17/2143552.html#ZOJ题目分类初学者题:1001 1037 1048 1049 1051 1067 1115 1151 1201 1205 1216 1240 1241 1242 1251 1292 1331 1334 1337 1338 1350 1365 1382 1383 1394 1402 1405 1414 1494 1514 1622 1715 1730 1755 1760 1763 1796 1813 1879 1889 1904 1915 1949 阅读全文

posted @ 2012-02-20 13:03 getgoing 阅读(214) 评论(0) 推荐(0) 编辑

导航