
Given a string s, return the length of the longest contiguous substring with no repeated characters. A substring is contiguous, and the goal is to do better than checking all substrings.
s = "abcabcbb"Output3WhyThe longest valid substring is `"abc"`.s = "bbbbb"Output1WhyAny valid substring can contain only one `b`.s = "pwwkew"Output3WhyA longest valid substring is `"wke"`.`0 <= len(s) <= 5 * 10^4``s` may contain letters, digits, symbols, and spacesAn `O(n)` solution is preferred