MediumSliding Window· 56% acceptance
#553

Longest Substring Without Repeating 8

Medium

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

Example 1

Input: s = "cdefabcdefabcdef"

Output: 6

Constraints

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

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

lengthOfLongestSubstring

← All practice problems