Given a string s, return the length of the longest substring that contains no repeated characters. A substring is a contiguous sequence of characters within the string. The input is a string, and the output is a single integer.
Example 1:
Input: s = "abcabcbb"
Output: 3
Explanation: The longest substring without repeating characters is "abc".
Example 2:
Input: s = "bbbbb"
Output: 1
Explanation: The longest substring without repeating characters is "b".
Example 3:
Input: s = "pwwkew"
Output: 3
Explanation: One valid longest substring is "wke".
0 <= len(s) <= 5 * 10^4s consists of English letters, digits, symbols, and spaces