Approach hintTry it first, then revealHide
Extend the right end while counting characters, and shrink from the left while all three digits remain present, recording the window length at each step. Output 0 if no window ever qualifies.
Extend the right end while counting characters, and shrink from the left while all three digits remain present, recording the window length at each step. Output 0 if no window ever qualifies.