Online assessment: coding portion that follows the SQL questions.
Implement a function that, given a string s, returns the length of the longest substring without repeating characters.
Use a sliding window and a hash map to track the latest index of each character.