298. Longest Stretch With No Repeat
Print the length of the longest contiguous stretch of the string in which no character appears twice.
abcabcbb -> 3 (abc)
bbbbb -> 1 (b)
pwwkew -> 3 (wke)
Slide a window. When the character arriving on the right is already inside the window, the window's left edge must move past that character's previous position.
The trap is that the previous position may be BEHIND the window's left edge
already, in which case it must not move backwards. The string abba is the
smallest case that exposes it.
Constraints - `1 ≤ length ≤ 200000` - The string contains lowercase letters only.
Input
A single line containing a string of lowercase letters.
Output
Print one integer, the length of the longest stretch with no repeated character.