Describe a time you solved a sliding window or string-type DSA problem.
For the hands-on coding portion, implement length_of_longest_substring(s). Given a string s, return the length of its longest substring containing no repeated characters. The substring must be contiguous, and characters are compared exactly, including case and spaces.
sdef length_of_longest_substring(s):