Longest Substring Without Repeating Characters (LC #3) is the classic sliding window problem. Maintain a window with a hash set of characters. Expand the right pointer, adding characters to the set. When you hit a duplicate, shrink from the left until the duplicate is removed. Track the maximum window size throughout. This runs in time since each character is added and removed at most once. Space is for English letters. Meta expects you to handle Unicode characters as a follow-up.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/meta-interview-prep/arrays-strings/longest-substring-without-repeating-characters
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████████████████████████████████████████████████████████████████████████████████████████████████████████████