Approach hintTry it first, then revealHide
Look for the longest window containing at most k zeros: extend the right end, and advance the left end whenever the number of zeros inside the window exceeds k.
Look for the longest window containing at most k zeros: extend the right end, and advance the left end whenever the number of zeros inside the window exceeds k.