← 返回 bytedance 的题目列表Length of Longest Substring Without Repeating Characters
类型:online_judge
Problem: Length of Longest Substring Without Repeating Characters
Given a string s, return the length of its longest contiguous substring that contains no repeated characters.
Input Format
First line: string s
Output Format
Print one integer: the length of the longest substring without duplicate characters.
Example 1
Input:
abcabcbb
Output:
3
Example 2
Input:
bbbbb
Output:
1
Example 3
Input:
pwwkew
Output:
3
Constraints
0 <= len(s) <= 2 * 10^5
s may contain any printable ASCII character.
Example
Input
abcabcbb
Output
3