210. Longest Substring Without Repeating Characters

MediumStringString

Given a string s, find the length of the longest substring without repeating characters.

Input: A quoted string s.

Output: Integer — length of longest unique substring.

Examples

Example 1
Input: "abcabcbb"
Output: 3
Explanation: 'abc' has length 3.
Example 2
Input: "bbbbb"
Output: 1
Explanation: 'b' length 1.
Example 3
Input: "pwwkew"
Output: 3
Explanation: 'wke' length 3.

Constraints

Asked by

InfosysAdobeIBMCognizantBloombergOracle
Solve this problem in the editor →