Longest Substring Without Repeating Characters May 16, 2011 in string Given a string, find the length of the longest substring without repeating characters. For 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. Hint: Is there a better way other than brute force? Consider the kind of data structure that can improve the run time complexity. An ideal solution requires only a one-time linear scan. Online Judge This problem is available at Online Judge .
Read full article from Longest Substring Without Repeating Characters | LeetCode
No comments:
Post a Comment