MediumSliding Window· 61% acceptance
#558

Longest Substring Without Repeating 13

Medium

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

Example 1

Input: s = "bcdefabcdef"

Output: 6

Constraints

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

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

lengthOfLongestSubstring

← All practice problems