MediumSliding Window· 51% acceptance
#548

Longest Substring Without Repeating 3

Medium

Return the length of the longest substring without repeating characters. Variant **#3**.

Example 1

Input: s = "defabcdefab"

Output: 6

Constraints

  • 0 <= s.length <= 5 * 10^4

Acceptance: 51% · Topics: sliding-window, hash-table, string

lengthOfLongestSubstring

← All practice problems