longest-substring-without-repeating-characters.sh — zsh
Longest Substring Without Repeating Characters
mediumstringssliding-windowhashmap
Given a string s, find the length of the longest substring without repeating characters.
ExamplesExample 1Input: s = "abcabcbb"
Output: 3
Example 2Input: s = "bbbbb"
Output: 1
Example 3Input: s = "pwwkew"
Output: 3
🔒 5 hidden
Running will execute all 8 cases, including 5 hidden ones.