学习kmp算法我最后是看的数据结构书上的一本教材学会的。。我觉得kmp相对于普通的BF算法就是避免了很多不必要的匹配,而kmp算法的精髓自然就在于next数组的运用。。。而next数组简而言之就是存储的就是模式串中第j个字符与主串中相应字符“失配”时,在模式串中需要重新和主串中失配的字符相比较的位置。。。我觉得这句概括挺好的。。。
题1:
hdu 1711 number sequen...
分类:
其他好文 时间:
2014-08-04 14:34:27
阅读次数:
277
Mybatis为什么要在configuration file中提供typeHandlers节点
因为java类型与数据库中保存的类型是有很大差异的,例如 在java中的类型为int,但是在数据库中可能为int也可能为number。因此建立数据库的类型映射是非常重要的。为了兼容多个数据库,以及考虑到未来数据库的发展,Mybatis采用了插入的方式来解决类型映射的问题。
我们可以在mybatis的...
分类:
其他好文 时间:
2014-08-04 14:19:27
阅读次数:
167
一、Array二、Boolean三、Date四、Error五、EvalError六、Function七、JSON八、Math九、Number十、Object十一、RangeError十二、ReferenceError十三、RegExp十四、String十五、SyntaxError十六、TypeErr...
分类:
编程语言 时间:
2014-08-04 13:56:37
阅读次数:
232
Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from th...
分类:
其他好文 时间:
2014-08-04 13:50:57
阅读次数:
208
一、构造函数 Number(value) new Number(value)二、Number属性 1、Number.MAX_VALUE 返回能表示的最大数字。 2、Number.MIN_VALUE 能表示的最小数字。 3、Number.NAN 非数字值。 4、Number...
分类:
编程语言 时间:
2014-08-04 13:40:37
阅读次数:
221
一、构造函数 new object() new object(value) value:可以是数字,布尔值或字符串,这些值将转换为Number、Boolean或者String对象。二、属性 object.constructor 所有对象的constructor属性都指向当前对象的构造函数的...
分类:
编程语言 时间:
2014-08-04 13:39:47
阅读次数:
206
C - Network of Schools
Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
A number of schools are connected to a computer network....
分类:
其他好文 时间:
2014-08-04 11:02:27
阅读次数:
177
问题:找出只出现一次的数,其他数出现了三次分析:将数转化为二进制的位,数出现了三次相当于其对应的二进制上每个位置出现了3次,这里有个抽象的地方就是,例如数中包含1,3两个其二进制的第一位都包含1, 怎么区分,其实并不需要区分,无论是数字3的还是数字1的二进制第一位的1都无所谓,因为我们完全可以...
分类:
其他好文 时间:
2014-08-04 10:53:27
阅读次数:
296
题目:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed f....
分类:
编程语言 时间:
2014-08-04 10:47:57
阅读次数:
222
题目:Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes....
分类:
编程语言 时间:
2014-08-04 04:09:56
阅读次数:
339