摘要:
如何加速朴素查找算法? KMP,当然还有其他算法,后续介绍.Knuth–Morris–Pratt string search algorithmStart at LHS of string, string[0], trying to match pattern, working right.Trying to match string[i] == pattern[j].Given a search pattern, pre-build a table,next[j], showing, when there is a mismatch at pattern position j, where 阅读全文