LiteCode
Run
Submit
Sign in
Question
Editorial
Submissions
AI
Notes
Longest Substring Without Repeating Characters
Medium
String
Given a string s, return the length of the longest substring without repeating characters.
Examples
Input:
abcabcbb
Output:
3
Input:
bbbbb
Output:
1
Constraints
1 <= |s| <= 1e5
s consists of ASCII letters and digits only
Editor
Reset
Loading...
Results
Results
Test Case 1
Test Case 2
Not run
Runtime: --
Memory: --
abcabcbb
Question
Editorial
Submissions
AI
Editor
Results
Notes
Longest Substring Without Repeating Characters
Medium
String
Given a string s, return the length of the longest substring without repeating characters.
Examples
Input:
abcabcbb
Output:
3
Input:
bbbbb
Output:
1
Constraints
1 <= |s| <= 1e5
s consists of ASCII letters and digits only