Problem

Longest Substring Without Repeating Characters

MediumStrings
Hash TableStringSliding Window

Given a string s, find the length of the longest substring without repeating characters.

Example :

Example 1:
Input:
s = "abcabcbb"
Output:
3
Explanation:

The answer is "abc", with the length of 3.

Constraints:

  • 0 <= s.length <= 5 * 104
  • s consists of English letters, digits, symbols and spaces.
Solution
Output
Input
nums = [2,7,11,15], target = 9
Expected
[0,1]
Run the code to see output and console results