3. Longest Substring Without Repeating Characters

MediumSliding Window

Given a string s, find the length of the longest substring without any repeating characters. A substring is a contiguous non-empty sequence of characters within the string. For example, in the string "abcabcbb", the longest substring without repeating characters is "abc" with length 3.

Examples

Input: abcabcbb

Output: 3

Explanation: Public test case for Longest Substring Without Repeating Characters

Constraints

  • 0 <= s.length <= 5*10^4
  • s consists of English letters, digits, symbols and spaces.
Loading...

Run checks all cases above. Submit evaluates all test cases.