Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters.
Example
The longest substring without repeating letters for "abcabcbb" is "abc",
which the length is 3. For "bbbbb" the longest substring is "b", with the length of 1.

Login to see Answer and Coaching Session More interview questions