Longest Substring Without Repeating Characters
Examples
Example 1:
Input: s = "zxyzxyz"
Output: 3
Explanation:
Example 2:
Input: s = "xxxx"
Output: 1
Example 1:
Input: s = "zxyzxyz"
Output: 3
Explanation:
Example 2:
Input: s = "xxxx"
Output: 1
Given a string s, find the length of the longest substring without duplicate characters.
A substring is a contiguous sequence of characters within a string.
The string "xyz" is the longest without duplicate characters.
0 <= s.length <= 1000s may consist of printable ASCII characters.