Search across blog, articles, projects, courses, and community posts
Find the length of the longest substring (a run of consecutive characters) in which no letter appears twice.
Input: one line of lowercase letters.
Output: the length of that longest substring.
The string has 1 to 1000 lowercase letters.
abcabcbb
3
bbbbb
1