Explain how you would solve the Longest Substring Without Repeating Characters problem efficiently.
Implement length_of_longest_substring(s), which receives a string and returns the length of its longest substring containing no repeated characters. The expected solution should run in linear time.
s.def length_of_longest_substring(s):