摘要:
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: 阅读全文
摘要:
Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k = 2 Output: 3 阅读全文
摘要:
Given a string s , find the length of the longest substring t that contains at most 2 distinct characters. Example 1: Example 2: 和 3. Longest Substrin 阅读全文
摘要:
Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
摘要:
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer 阅读全文
摘要:
Given a string with no duplicate characters, return a list with all permutations of the characters. Examples Set = “abc”, all permutations are [“abc”, 阅读全文
摘要:
Given a number of different denominations of coins (e.g., 1 cent, 5 cents, 10 cents, 25 cents), get all the possible ways to pay a target number of ce 阅读全文
摘要:
Given a set of characters represented by a String, return a list containing all subsets of the characters. Assumptions There are no duplicate characte 阅读全文
摘要:
Given a binary tree, determine if it is a complete binary tree. Definition of a complete binary tree from Wikipedia:In a complete binary tree every le 阅读全文
摘要:
Determine if an undirected graph is bipartite. A bipartite graph is one in which the nodes can be divided into two groups such that no nodes have dire 阅读全文