Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "". The testcases will be generated such that the answer is unique.
Example 1
Input: s = ADOBECODEBANC, t = ABC
Output: BANC
Explanation: "BANC" contains an 'A', a 'B' and a 'C', and it is the shortest such window in s. Longer windows such as "ADOBEC" also work but are not minimal.
Example 2
Input: s = a, t = a
Output: a
Explanation: s itself is "a", which contains the one 'a' that t needs.
Example 3
Input: s = a, t = aa
Output:
Explanation: t needs two 'a's, but s has only one, so no window works and the answer is the empty string.
Grow the window on the right until it "has" `t`; then greedily shrink from the left to minimize. A counter `have` that equals `len(t_needs)` tells us the window is valid.
Run checks all cases above. Submit evaluates all test cases.