← problems
#3

Longest Substring Without Repeating Characters

MediumSliding Window

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

Example

"abcabcbb"  => 3   // "abc"
"bbbbb"     => 1   // "b"
"pwwkew"    => 3   // "wke"
Implement
function LengthOfLongestSubstring(s: string) -> int

Found a bug? Or annoyed about something in the language? Tell us.

loading editor…