Minimum Window Substring — expand then contract
Grow the window until it covers every needed letter, then shrink it from the left as far as it stays valid. Track the smallest valid window seen.
Try:
← Prev
Next →
▶ Play
Reset
matched / needed
0 / 0
smallest valid window
—