Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 85fcd38

Browse files
committedOct 17, 2024·
Fixed incorrect function name in test cases
1 parent deb7f89 commit 85fcd38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎strings/min_window_substring.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ def min_window(search_str: str, target_letters: str) -> str:
55
all target char_dict.
66
77
>>> min_window("Hello World", "lWl")
8-
"llo W"
8+
'llo W'
99
>>> min_window("Hello World", "f")
10-
""
10+
''
1111
1212
This solution uses a sliding window, alternating between shifting
1313
the end of the window right until all target char_dict are contained
@@ -28,7 +28,7 @@ def min_window(search_str: str, target_letters: str) -> str:
2828

2929
# Return if not possible due to string lengths.
3030
if search_len < target_count:
31-
return ""
31+
return ''
3232

3333
# Build dictionary with counts for each letter in target_letters
3434
char_dict = {}
@@ -82,4 +82,4 @@ def min_window(search_str: str, target_letters: str) -> str:
8282
if exists:
8383
return search_str[min_window[0] : min_window[1]]
8484
else:
85-
return ""
85+
return ''

0 commit comments

Comments
 (0)
Please sign in to comment.