摘要: 1.kmp算法的原理: 本部分内容转自:http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.html 字符串匹配是计算机的基本任务之一。 举例来说,有一个字符串"BBC ABCDAB 阅读全文
posted @ 2016-10-26 16:16 SarahLiu77 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 【leetcode】409. Longest Palindrome Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can 阅读全文
posted @ 2016-10-26 10:37 SarahLiu77 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 【leetcode】438. Find All Anagrams in a String Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consi 阅读全文
posted @ 2016-10-26 10:22 SarahLiu77 阅读(632) 评论(0) 推荐(0) 编辑
摘要: 斐波那契数列(Fibonacci sequence),又称黄金分割数列、因数学家列昂纳多·斐波那契(Leonardoda Fibonacci)以兔子繁殖为例子而引入,故又称为“兔子数列”,指的是这样一个数列:0、1、1、2、3、5、8、13、21、34、……在数学上,斐波纳契数列以如下被以递归的方法 阅读全文
posted @ 2016-10-26 09:28 SarahLiu77 阅读(735) 评论(0) 推荐(0) 编辑