mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 16:54:50 +08:00
修改字符串 实控线strstr题目链接
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
# 28. 实现 strStr()
|
# 28. 实现 strStr()
|
||||||
|
|
||||||
[力扣题目链接](https://leetcode.cn/problems/implement-strstr/)
|
[力扣题目链接](https://leetcode.cn/problems/find-the-index-of-the-first-occurrence-in-a-string/)
|
||||||
|
|
||||||
实现 strStr() 函数。
|
实现 strStr() 函数。
|
||||||
|
|
||||||
@ -699,7 +699,7 @@ class Solution(object):
|
|||||||
if haystack[i:i+n]==needle:
|
if haystack[i:i+n]==needle:
|
||||||
return i
|
return i
|
||||||
return -1
|
return -1
|
||||||
```
|
```
|
||||||
```python
|
```python
|
||||||
// 方法一
|
// 方法一
|
||||||
class Solution:
|
class Solution:
|
||||||
|
Reference in New Issue
Block a user