โœ๏ธ

Longest Substring Without Repeats

Medium๐Ÿท๏ธ Sliding window๐Ÿ“‚ Two Pointers & Sliding Window
๐Ÿงฉ The problem

Return the length of the longest substring that has no repeated characters.

Examples

  • "abcabcbb" โ†’ 3 ("abc")

๐ŸŽฏ Aim for: O(n) time

โœ๏ธ Write your solution

Pick a language, press Run to try it, then Run tests to check it against every test case โ€” just like a coding interview.

โ† All practice problems