摘要:
1.kmp算法的原理: 本部分内容转自:http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.html 字符串匹配是计算机的基本任务之一。 举例来说,有一个字符串"BBC ABCDAB 阅读全文
摘要:
【leetcode】409. Longest Palindrome Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can 阅读全文
摘要:
【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 阅读全文
摘要:
斐波那契数列(Fibonacci sequence),又称黄金分割数列、因数学家列昂纳多·斐波那契(Leonardoda Fibonacci)以兔子繁殖为例子而引入,故又称为“兔子数列”,指的是这样一个数列:0、1、1、2、3、5、8、13、21、34、……在数学上,斐波纳契数列以如下被以递归的方法 阅读全文