Add comment to 28. Find the Index of the First Occurrence in a String
This commit is contained in:
parent
127c2a32f4
commit
30e48785a8
@ -1,3 +1,5 @@
|
||||
# Also consider using the KMP algorithm for better asymptotic performance (O(n+m) vs O(nm)).
|
||||
|
||||
class Solution:
|
||||
def strStr(self, haystack: str, needle: str) -> int:
|
||||
for i in range(len(haystack)):
|
||||
|
Loading…
Reference in New Issue
Block a user