MediumSliding Window· 57% acceptance
#571

Longest Substring Without Repeating 26

Medium

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

Example 1

Input: s = "cdefabcdefabcd"

Output: 6

Constraints

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

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

lengthOfLongestSubstring

← All practice problems