Minimum Window Substring

Find smallest window containing all target characters.

Problem: Find the minimum window in ss containing all characters of tt.

Approach: Expand until window contains all required characters. Track with a frequency map and counter for satisfied character types. Once valid, shrink from left while maintaining validity, updating the answer.

Time: O(s+t)O(|s| + |t|). Each character visited at most twice.

Space: O(s+t)O(|s| + |t|) for frequency maps.

See the implementation unit for code.