Sliding window · 5 minutes
Repair a distinct-character window
Get feedback on your answer. No account needed.
You extend a window for the longest substring without repeats. The new character is already in the window. What should you do before recording its length?
