leetcode_字符串_28_实现 strStr()&&KMP算法

/* 暴力法的特色就是强行遍历 知足条件就返回撤出 / class Solution { public: int strStr(string haystack, string needle) { if(needle.length()==0) { return 0; } int i=0,j=0; while(i<haystack.length()&&j<needle.length()) { //开始
相关文章
相关标签/搜索