This question evaluates string-processing skills and algorithmic problem-solving, including handling character uniqueness and performance considerations. Commonly asked in Coding & Algorithms interviews to assess a candidate's ability to implement efficient solutions and reason about time/space trade-offs, it targets practical application rather than purely conceptual understanding.
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.