字符串匹配算法分析

1. Bruce Force 字符串暴力匹配算法

最简单也是最朴素的算法,直接贴上代码

//text是待匹配的目标串,pattern为模式串。
//需要在目标串text中找到与模式串pattern相同的子串
int BruteForce(string text, string pattern){[......]<p class="read-more"><a href="https://www.herui.club/archives/785">继续阅读</a></p>