Longest Substring Without Repeating Characters
Problem Given a string, find the length of the longest substring that contains no repeating characters.
Input / Output
- Input: string s.
- Output: the length of the longest substring with all-distinct characters.
Constraints
- 0 ≤ |s| ≤ 5 × 10^4.
Example
- "abcabcbb" → 3 ("abc"); "bbbbb" → 1; "pwwkew" → 3 ("wke").
added …