Longest Substring Without Repeating Characters
Find the length of the longest substring of a string without repeating characters.
Input format
The first line contains a single string S (lowercase letters).
Output format
Print the length of the longest substring without repeating characters.
Constraints
- Values fit in a 64-bit signed integer
- Trailing whitespace and a trailing newline are ignored by the judge
Read from stdin, write to stdout. Sample cases below show the exact format.
Sample cases
Example 1
Input
abcabcbbExpected output
3Example 2
Input
bbbbbExpected output
1