← Questions

Minimum window substring

0
MetaGoogleCharacter.AICodingLast asked May 2026

Given strings s and t, return the shortest substring of s that contains every character of t, counting repeats, or an empty string if there is none. Grow the window until it covers t, then shrink it from the left.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding