What is the longest substring without repeating characters?
Implement length_of_longest_substring(s) to return the length of the longest contiguous substring in which every character appears at most once. Return 0 for an empty string. The solution should run in linear time.
Function signature: length_of_longest_substring(s)
Input is a string, and output is an integer.
def length_of_longest_substring(s):