Given a string, find the length of the longest substring that contains no repeated characters.
Input
One line of up to 10^5 printable characters (no spaces).
Output
A single integer: the length of the longest substring with all-unique characters.
Hint
Keep a window [start, i] and a map of the last position of each character. When you meet a repeat inside the window, jump start past it.
Read from standard input and write to standard output. 5 test cases in total (3 hidden). Tests for this language run inside your browser.