Longest Substring Without Repeating Characters

Given string *s*, find length of the longest substring without repeating characters. (Sliding-window with hash set).

Input Format

One line string s.

Output Format

Length as integer.

Constraints

  • 0 <= len(s) <= 10^5.

Examples

Example 1:

Input:

s = "abcabcbb"

Output:

3

Explanation:

Longest substring without repeating is "abc" of length 3.

Loading...
Longest Substring Without Repeating Characters