Merge pull request #1634 from Allen9012/master

更新 字符串板块 实现strstr 这道题的题目链接
This commit is contained in:
程序员Carl
2022-09-12 10:01:34 +08:00
committed by GitHub

View File

@ -9,7 +9,7 @@
# 28. 实现 strStr()
[力扣题目链接](https://leetcode.cn/problems/implement-strstr/)
[力扣题目链接](https://leetcode.cn/problems/find-the-index-of-the-first-occurrence-in-a-string/)
实现 strStr() 函数。
@ -699,7 +699,7 @@ class Solution(object):
if haystack[i:i+n]==needle:
return i
return -1
```
```
```python
// 方法一
class Solution: