From 3c225247b843233a306a94907f862bece6e637dc Mon Sep 17 00:00:00 2001 From: Shubham Ganar <67952129+shubhamsg199@users.noreply.github.com> Date: Fri, 13 Aug 2021 12:40:52 +0530 Subject: [PATCH] [mypy] Fix type annotations for strings/naive_string_search.py (#4611) --- strings/naive_string_search.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/strings/naive_string_search.py b/strings/naive_string_search.py index f28950264..315990087 100644 --- a/strings/naive_string_search.py +++ b/strings/naive_string_search.py @@ -1,10 +1,8 @@ """ https://en.wikipedia.org/wiki/String-searching_algorithm#Na%C3%AFve_string_search - this algorithm tries to find the pattern from every position of the mainString if pattern is found from position i it add it to the answer and does the same for position i+1 - Complexity : O(n*m) n=length of main string m=length of pattern string @@ -39,4 +37,4 @@ def naive_pattern_search(s: str, pattern: str) -> list: if __name__ == "__main__": assert naive_pattern_search("ABCDEFG", "DE") == [3] - print(f"{naive_pattern_search('ABAAABCDBBABCDDEBCABC', 'ABC') = }") + print(naive_pattern_search("ABAAABCDBBABCDDEBCABC", "ABC"))