Tell me about a time you solved basic CSS problems and a LeetCode-style algorithm problem; walk me through your approach and key decisions.
For the algorithm portion, implement length_of_longest_substring(s). Given a string s, return the length of its longest substring without repeated characters. The substring must contain consecutive characters, and an empty string returns 0.
sdef length_of_longest_substring(s):