Knuth-Morris-Pratt algorithm
使用時機: 給定A,B兩字串,尋找B字串是否存在A當中 當B的字串內容,本身有重複的字串時,可用KMP以減少重複否配的時間
ex: B : aabaab B字串本身重複 “aab”
方法:先用fail function找出字串B重複的字串
Please enable JavaScript to view the comments powered by Disqus.