From 3418c8031f16a602875e59ab44b2609463bfe672 Mon Sep 17 00:00:00 2001 From: Wilson Strasilla Date: Thu, 17 Oct 2024 14:35:45 -0700 Subject: [PATCH] Formatting Fixes --- strings/min_window_substring.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/strings/min_window_substring.py b/strings/min_window_substring.py index 9aa85cd2d..396526f9e 100644 --- a/strings/min_window_substring.py +++ b/strings/min_window_substring.py @@ -14,15 +14,15 @@ def min_window(search_str: str, target_letters: str) -> str: in the window, and shifting the start of the window right until the window no longer contains every target character. - Time complexity: O(target_count + search_len) -> - The algorithm checks a dictionary at most twice for each character + Time complexity: O(target_count + search_len) -> + The algorithm checks a dictionary at most twice for each character in search_str. - Space complexity: O(search_len) -> - The primary contributer to additional space is the building of a + Space complexity: O(search_len) -> + The primary contributer to additional space is the building of a dictionary using the search string. """ - + target_count = len(target_letters) search_len = len(search_str) @@ -84,4 +84,4 @@ def min_window(search_str: str, target_letters: str) -> str: if (exists): return search_str[min_window[0]:min_window[1]] else: - return "" \ No newline at end of file + return ""