Medium · Arrays
Longest substring w/o repeat
Given a string s, return the length of the longest substring of s (a contiguous run of characters) that contains no repeated character.
Examples
Example 1
{
"s": "abcabcbb"
}Output: len 3
Example 2
{
"s": "pwwkew"
}Output: len 3
Rebuild it in the studio
Read every interview problem free. Ten rooms need no account. A token opens a problem in full — Pro never counts.