Longest substring without repeats
Grow the window on the right while no character repeats. The character that repeats ends a good window one shorter — measure it — then shrink from the left until the earlier copy of that character has left.
Grow the window on the right while no character repeats. The character that repeats ends a good window one shorter — measure it — then shrink from the left until the earlier copy of that character has left.