← 返回 bytedance 的题目列表Longest Substring Without Repeating Characters
类型:online_judge
Given a string s, find the length of the longest substring without repeating characters.
Example 1:
Input: s = "abcabcbb"
Output: 3
Example 2:
Input: s = "bbbbb"
Output: 1
Example 3:
Input: s = "pwwkew"
Output: 3
Constraint:
The input string includes only ASCII characters.
Your algorithm should have a time complexity of O(n).
Example
Input
abcabcbb