Question
Given strings s and t, return the shortest contiguous substring of s that contains every character of t including multiplicities (e.g. if t has two 'a's, the window must too). If no such window exists, return the empty string. If there are multiple shortest windows, any one of them is acceptable but the reference returns the leftmost. For example, the minimum window of "ABC" inside "ADOBECODEBANC" is "BANC". s and t can each be up to 10^5 characters; aim for O(len(s)) time.
min_window(s: str, t: str) → str["ADOBECODEBANC","ABC"]out"BANC"State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.