MMedium· sliding-window· hash-map· string
Longest Substring Without Repeating Characters
Longest Substring Without Repeating Characters
Given a string s, find the length of the longest substring that contains no repeating characters.
Example
Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", which has length 3.
Constraints
- 0 <= s.length <= 5 * 10^4
- s consists of English letters, digits, symbols, and spaces
Entry — lengthOfLongestSubstring
Grading — exact over 5 tests