Longest Substring Without Repeating Characters

Medium

📝 Description

Given a string s, find the length of the longest substring without repeating characters. A substring is a contiguous non-empty sequence of characters within a string.

Input Format

A single string s

Output Format

An integer representing the length of the longest substring

Constraints

0 ≤ s.length ≤ 5 * 10^4 s consists of English letters, digits, symbols and spaces.

🔍 Sample Input

abcabcbb
            

✅ Sample Output

3
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run