摘要: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho 阅读全文
posted @ 2017-02-11 14:59 CodesKiller 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. 阅读全文
posted @ 2017-02-11 13:05 CodesKiller 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be 阅读全文
posted @ 2017-02-11 12:01 CodesKiller 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num 阅读全文
posted @ 2017-02-11 11:43 CodesKiller 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文
posted @ 2017-02-11 10:04 CodesKiller 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may a 阅读全文
posted @ 2017-02-11 09:15 CodesKiller 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 此题的想法是遍历一遍haystack数组,当遍历 阅读全文
posted @ 2017-02-11 08:40 CodesKiller 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 字符串匹配的KMP算法 作者: 阮一峰 日期: 2013年5月 1日 作者: 阮一峰 日期: 2013年5月 1日 字符串匹配是计算机的基本任务之一。 举例来说,有一个字符串"BBC ABCDAB ABCDABCDABDE",我想知道,里面是否包含另一个字符串"ABCDABD"? 许多算法可以完成这 阅读全文
posted @ 2017-02-11 07:38 CodesKiller 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can f 阅读全文
posted @ 2017-02-11 07:22 CodesKiller 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: 阅读全文
posted @ 2017-02-11 06:44 CodesKiller 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if a permutation of the string could form a palindrome. For example,"code" -> False, "aab" -> True, "carerac" -> True. 这道题收到 阅读全文
posted @ 2017-02-11 04:08 CodesKiller 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given a string s, return all the palindromic permutations (without duplicates) of it. Return an empty list if no palindromic permutation could be form 阅读全文
posted @ 2017-02-11 03:41 CodesKiller 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following unique pe 阅读全文
posted @ 2017-02-11 01:47 CodesKiller 阅读(117) 评论(0) 推荐(0) 编辑