← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given a string s, find the length of the longest substring without repeating characters. A substring is a contiguous sequence of characters within a string.
0 <= s.length <= 5 * 10^4s consists of English letters, digits, and symbols.Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", which the length of the longest substring without repeating characters.
Input: s = "bbbbb"
Output: 1
Explanation: The answer is "b", with the length of 1.
Input: s = "pwwkew"
Output: 3
Explanation: The answer is "wke", which the length of the longest substring without repeating characters.
Input: s = ""
Output: 0
Explanation: The answer is an empty string, which the length of the longest substring without repeating characters is 0.