Minimum Window Substring
Expand right until the window is valid, then shrink from left while it stays valid. Track how many required characters are still missing instead of recounting the map every step.
Duplicates in t count. Record the answer before shrinking, not after.