Given a string s, return the length of the longest substring that contains no repeated characters. A substring is a contiguous sequence of characters, and the function should return an 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: The longest substring without repeating characters is "wke".
0 <= len(s) <= 5 * 10^4s consists of English letters, digits, symbols, and spaces