Find the smallest substring that contains all characters (including duplicates) of a pattern.
Constraints
Example
```python # Example 1 s = "ADOBECODEBANC" t = "ABC" print(min_window_substring(s, t)) # Expected: "BANC" # Example 2 s = "a" t = "aa" print(min_window_substring(s, t)) # Expected: "" # Example 3 s = "a" t = "a" print(min_window_substring(s, t)) # Expected: "a" # Example 4 s = "ab" t = "A" print(min_window_substring(s, t)) # Expected: "" ```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints