MediumSliding Window· 64% acceptance
#561

Longest Substring Without Repeating 16

Medium

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

Example 1

Input: s = "efabcdefabcdef"

Output: 6

Constraints

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

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

lengthOfLongestSubstring

← All practice problems