mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 08:50:15 +08:00
Merge pull request #1634 from Allen9012/master
更新 字符串板块 实现strstr 这道题的题目链接
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user