KMP算法

KMP算法 問題描述:給定字符串A和其子串B, 在A中查找B,返回其下標 已給出BF解法和KMP解法web #include<stdio.h> #include<string.h> #include<assert.h> /* 簡單BF算法 */ int BF(const char *str, const char *substr) { assert(str && substr);
相關文章
相關標籤/搜索