diff --git a/python/28_find_the_index_of_the_first_occurrence_in_a_string b/python/28_find_the_index_of_the_first_occurrence_in_a_string index d843ed9..987cefa 100644 --- a/python/28_find_the_index_of_the_first_occurrence_in_a_string +++ b/python/28_find_the_index_of_the_first_occurrence_in_a_string @@ -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)):