MediumSliding Window· 59% acceptance
#590

Longest Substring Without Repeating 45

Medium

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

Example 1

Input: s = "defabcdefabcd"

Output: 6

Constraints

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

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

lengthOfLongestSubstring

← All practice problems