Formatting Fixes

This commit is contained in:
Wilson Strasilla 2024-10-17 14:35:45 -07:00
parent 00b17c4c7c
commit 3418c8031f

View File

@ -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 ""
return ""