Log in
← All problems

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

Examples use JSON: true/false/null are True/False/None in Python.

Run examples checks the examples above. Submit also runs 5 hidden tests.