【中等难度】3. Longest Substring Without Repeating Characters (最长不重复子串)
https://leetcode.com/problems/longest-substring-without-repeating-characters/
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example:
Input: "babad"
Output: "bab"
Note: "aba" is also a valid answer.
Example:
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.
Tags: Hash Table, Two Pointers
//代码放在这个块里面,可以高亮关键字
PS: 请保留二维码链接,以便更多人参与进来。谢谢。
