Spotify tracks user activity strings where each character represents an event type. Given a string s, return the length of the longest substring without repeating characters.
A substring is a contiguous sequence of characters within the string. You must design an algorithm better than checking all possible substrings.
ss that contains no duplicate charactersdef length_of_longest_substring(s):