[LeetCode C++] 28. 实现 strStr()_class solution { public: int strstr(string haystac-CSDN博客

网站介绍:来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/implement-strstr/题目:方法一:暴力匹配class Solution {public: int strStr(string haystack, string needle) { int n = haystack.size(), m = needle.size(); for (int i = 0; i + m <= n; i++) {_class solution { public: int strstr(string haystack, string needle) { int n