S
All challenges
Practice
Home
Blog
Practice
Examples
Feedback
Longest Substring Without Repeating Chars
00:00
Start
00:00
Sign in
Problem
Hints
3
Solution
History
Medium
String
Sliding Window
HashMap
Amazon
Google
Facebook
Find the length of the longest substring without any repeating characters.
Examples
Example 1
Input →
'abcabcbb'
Output →
3
Note:
'abc'
Example 2
Input →
'bbbbb'
Output →
1
Note:
'b'
Example 3
Input →
'pwwkew'
Output →
3
Note:
'wke'
Example 4
Input →
''
Output →
0
JavaScript
Python
Java (Coming soon)
C (Coming soon)
C++ (Coming soon)
Reset
Run
Submit
Cases
Results