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()) { //開始
相關文章
相關標籤/搜索