Longest stretch without repeats
hardStrings40 XP
Return the length of the longest substring of s (a run of neighbouring characters) in which no character repeats. Try to do it in one pass.
Examples
- Input: s = "abcabcbb"Output: 3
- Input: s = "bbbbb"Output: 1
Examples use JSON: true/false/null are True/False/None in Python.