$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · hard · #276

What goes in the blank?

# longest window with no repeats
while seen[ch] > 1:
    seen[s[left]] -= 1
    left ____ 1

Answer: += (also accepted: +=)

Advancing the left edge shrinks the sliding window until the duplicate is gone.
Play Problem Solving ▸