Skip to content

Commit 078742b

Browse files
author
Joseph Luce
authored
Update 076_minimum_window_substring.md
1 parent 85ea345 commit 078742b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

leetcode/hard/076_minimum_window_substring.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Then we have to keep a dynamic counter, decrementing and incrementing character
1919
With this, after we moved the right pointer to the right, we can use these two dictionaries to check if this is a substring that meets the requirements.
2020
If so, we can then try pruning with the left pointer all the way to the right pointer or if it doesn't meet the requirement.
2121

22+
For the run-time, worst case, we will be visiting each character twice.
23+
2224
You may think that the run-time for this is exponential, especially when we are checking the two dictionaries.
2325
However, don't be mistaken, the comparison is actually a constant T run-time, it doesn't change based on S, but rather on T.
2426
There is one slight problem, python's implementation of string concatention is actually **O(N)**.

0 commit comments

Comments
 (0)