← 返回 amazon 的题目列表Longest Substring Without Repeating Characters
类型:online_judge
Given a string, find the length of the longest substring without repeating characters. The input is a string, and the output is an integer, representing the length of the longest substring without repeating characters.
Example:
Input: 'abcabcbb'
Output: 3
Explanation: The answer is 'abc', with the length of 3.
Input: 'bbbbb'
Output: 1
Explanation: The answer is 'b', with the length of 1.
Constraints:
The length of the input string does not exceed 10^5.
The string consists only of ASCII characters.
Example
Input
abcabcbb