Given a string s, return the length of the longest substring without repeated characters.
Examples
Input:"abcabcbb"
Output:3
Input:"bbbbb"
Output:1
Hints
Use a sliding window approach with two pointers (left and right) to represent the current substring being considered.
Maintain a hash map to store the last seen index of each character for O(1) lookups.
When a duplicate is found, adjust the left pointer to the maximum between its current position and one past the last occurrence of the duplicate character to ensure the window remains valid.