← 返回 apple 的题目列表Longest Substring Without Repeating Characters
类型:qbank
Given a string s, find the length of the longest substring without duplicate characters.
Examples
Example 1:
Input: s = "zxyzxyz"
Output: 3
Explanation:
The string "xyz" is the longest without duplicate characters.
Example 2:
Input: s = "xxxx"
Output: 1
Constraints
0 <= s.length <= 1000
s may consist of printable ASCII characters.