How would you implement a sliding window solution for the Longest Substring Without Repeating Characters problem?
Implement the function below. 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 as provided.
Function: length_of_longest_substring(s)
Input: A string s. Output: An integer length.
Constraints: 0 <= len(s) <= 5 * 10^4; s may contain letters, digits, symbols, and spaces.
def length_of_longest_substring(s):