Medium · Sliding window
Longest Substring Without Repeating Characters
You are given a string, s. Find the longest stretch of characters sitting next to each other in which no character appears twice, and return its length.
- The characters must be next to each other: you cannot skip any.
- Return the length, not the text itself.
- An empty string gives 0.
s = "abcabcbb"
→ 3 ("abc")Record your take