algorythms
Sliding Window
LC #3Medium

Longest Substring Without Repeating Characters

Sliding Window
AmazonGoogleMetaMicrosoftBloomberg

Problem

Find the length of the longest substring that contains no repeating characters.

stringsliding-windowhash-map

Constraints

  • 0 ≤ s.length ≤ 5 × 10⁴
  • s consists of English letters, digits, symbols, and spaces

Example

Inputs = "abcabcbb"
Output3
Why

"abc" is the longest substring without repeating characters

Hints — reveal one at a time