Longest Substring Without Repeating Characters
Find the length of the longest contiguous part of a string with no repeated character.
The problem
Implement Solution.lengthOfLongestSubstring(text). Return the length of the longest substring of text, a contiguous run of characters, in which no character appears twice. text may contain letters, digits, spaces and symbols, and may be empty, in which case return 0. For example, 'abcabcbb' returns 3 for 'abc'.
Starter code
class Solution:
def lengthOfLongestSubstring(self, text: str) -> int:
passPublic examples
text = "abcabcbb"gives3text = "bbbbb"gives1text = "a b!a"gives4
Solving it in the practice book needs an active paid plan.
Open it in the practice bookOne thought at a time.
