Skip to content

Commit 84a7ab3

Browse files
Refactor comment for clarity in shrinking window logic.
Improved the inline comment to enhance readability and conciseness. This change does not affect the functionality but makes the code easier to understand for future maintainers.
1 parent 7d6d325 commit 84a7ab3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sliding Window/minimum_window_substring.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def min_window(s: str, t: str) -> str:
4545
if current_window_length < min_window_length:
4646
result = current_window_length, left, right
4747

48-
# The character at the position by the 'left' pointer is no longer a part of the window
49-
# Therefore, shrink the window
48+
# The character at the position by the 'left' pointer is no longer a part of the window,
49+
# therefore, shrink the window
5050
window_counts[char] -= 1
5151
window = remove_leftmost_occurrence(window, char)
5252

0 commit comments

Comments
 (0)