1. Grow to Cover, Shrink to Minimise Optimal
Intuition
Two motions, not one: extend the right edge until the window covers everything t needs, then pull the left edge in as far as coverage survives, recording the smallest window each time it does. Coverage is tracked as a single integer of outstanding requirements rather than by comparing maps — that counter is what keeps the whole thing linear.
Algorithm
1. Count what t requires. Set an outstanding counter to t's length.
2. Extend right: if the character was still required, decrement the counter.
3. While the counter is zero, the window covers t — record it if smallest, then release the left character; if that makes it required again, raise the counter.
4. Return the smallest window recorded, or the empty string.
Time & Space
Time O(s + t) — each edge crosses the string once. Space O(1) over a fixed character set.