Given a string, find the length of the longest substring without repeating characters. You're solving the classic variable-size sliding window problem.
You expand the window until you see a repeat, then shrink until the constraint is satisfied again. Read the problem. The string can have up to characters.