mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Formatting Fixes
This commit is contained in:
parent
00b17c4c7c
commit
3418c8031f
|
@ -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 ""
|
||||
|
|
Loading…
Reference in New Issue
Block a user