← 返回 nvidia 的题目列表Longest Substring Without Repeating Characters
类型:online_judge
Problem: Length of the Longest Substring Without Repeating Characters
Given a string s, return the length of the longest substring that contains no repeating characters.
Input (stdin)
One line containing string s.
Output (stdout)
Print an integer: the maximum length.
Constraints
0 <= len(s) <= 1e5
s contains visible ASCII characters (treat as normal characters).
Examples
Input: abcabcbb Output: 3
Input: bbbbb Output: 1
Input: pwwkew Output: 3
Example
Input
abcabcbb
Output
3