- Leetcode28
- 1.问题描述
- 2.解决方案
- 解法一:库函数
- 解法二:KMP
class Solution {
public:
int strStr(string haystack, string needle) {
return haystack.find(needle);
}
};
https://programmercarl.com/0028.%E5%AE%9E%E7%8E%B0strStr.html#其他语言版本

class Solution {
public:
int strStr(string haystack, string needle) {
return haystack.find(needle);
}
};
https://programmercarl.com/0028.%E5%AE%9E%E7%8E%B0strStr.html#其他语言版本