Skip to content
UPEEC

Longest Substring Without Repeats

Medium#strings#sliding-window#hashing· solved by 0 · time limit 2.0 s

Find the length of the longest substring (contiguous) in which no character repeats.

Input

One string of lowercase letters.

Output

The length.

Constraints

1 to 10510^5 letters.

Sample 1

Input

abcabcbb

Output

3

Sample 2

Input

bbbbb

Output

1

Sign in or join free to run and submit your solution.