Longest Substring Without Repeating Characters
Mediumjavapythonccppjavascript
Given a string, find the length of the longest substring that contains no repeated character.
Input Format
A single line containing the string S with no spaces.
Output Format
Print the length of the longest substring with all distinct characters.
Example 1
Input
abcabcbb
Output
3
Explanation: abc is the longest substring with all unique characters.
- 1 <= length of S <= 100000
- S consists of lowercase English letters and digits.