Longest Unique Substring
STRING

Problem

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

Examples

longestUniqueSubstring("abcaa"); // returns 3 // The longest unique sequence is "abc" longestUniqueSubstring("aaa"); // returns 1
Loading...