Skip to content

Commit 3c22524

Browse files
authored
[mypy] Fix type annotations for strings/naive_string_search.py (TheAlgorithms#4611)
1 parent cd98737 commit 3c22524

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

strings/naive_string_search.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""
22
https://en.wikipedia.org/wiki/String-searching_algorithm#Na%C3%AFve_string_search
3-
43
this algorithm tries to find the pattern from every position of
54
the mainString if pattern is found from position i it add it to
65
the answer and does the same for position i+1
7-
86
Complexity : O(n*m)
97
n=length of main string
108
m=length of pattern string
@@ -39,4 +37,4 @@ def naive_pattern_search(s: str, pattern: str) -> list:
3937

4038
if __name__ == "__main__":
4139
assert naive_pattern_search("ABCDEFG", "DE") == [3]
42-
print(f"{naive_pattern_search('ABAAABCDBBABCDDEBCABC', 'ABC') = }")
40+
print(naive_pattern_search("ABAAABCDBBABCDDEBCABC", "ABC"))

0 commit comments

Comments
 (0)