Longest Substring Without Repeating Characters:
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given “abcabcbb”, the answer is “abc”, which the length is 3.
Given “bbbbb”, the answer is “b”, with the length of 1.
Given “pwwkew”, the answer is “wke”, with the length of 3.
Note that the answer must be a substring, “pwke” is a subsequence and not a substring.
寻找最长无重复字符的子串
注:子串是完全相邻的字符集合,而子序列是从左向右顺序的不一定相邻的字符集合,注意其区别
给定一个字符串,寻找其最长无重复字符的子串的长度
例如
“abcabcbb” –> “abc”, length = 3
“bbbbb” –> “b”, length = 1
“pwwkew” –> “wke”, length 3