From 62c560dfd544602490924b89f5a5b651ea4d81b3 Mon Sep 17 00:00:00 2001 From: Shubham Ganar Date: Mon, 9 Aug 2021 23:57:45 +0530 Subject: [PATCH] [mypy] Fix type annotations for strings/naive_string_search.py --- 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 f28950264121..31599008720c 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"))