2015年10月5日

44. Wildcard Matching (String; DP, Back-Track)

摘要: Implement wildcard pattern matching with support for '?' and '*'. *正则表达式的定义: '.' Matches any single character. '*' Matches zero or more of the precedi 阅读全文

posted @ 2015-10-05 19:07 joannae 阅读(172) 评论(0) 推荐(0)

93. Restore IP Addresses(dfs)

摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135", return ["2 阅读全文

posted @ 2015-10-05 09:51 joannae 阅读(241) 评论(0) 推荐(0)

40. Combination Sum II (Back-Track)

摘要: 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 @ 2015-10-05 08:31 joannae 阅读(160) 评论(0) 推荐(0)

39. Combination Sum (Back-Track)

摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeat 阅读全文

posted @ 2015-10-05 08:26 joannae 阅读(199) 评论(0) 推荐(0)

31. Next Permutation (Array; Math)

摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文

posted @ 2015-10-05 08:18 joannae 阅读(193) 评论(0) 推荐(0)

47. Permutations II (Back-Track, Sort)

摘要: 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 @ 2015-10-05 07:07 joannae 阅读(213) 评论(0) 推荐(0)

46. Permutations (Back-Track,Sort)

摘要: Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1 阅读全文

posted @ 2015-10-05 07:01 joannae 阅读(238) 评论(0) 推荐(0)

77. Combinations (Recursion)

摘要: Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,3],... 阅读全文

posted @ 2015-10-05 06:56 joannae 阅读(192) 评论(0) 推荐(0)

90. Subsets II (Back-Track, DP)

摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: Elements in a subset must be in non-descending 阅读全文

posted @ 2015-10-05 06:51 joannae 阅读(150) 评论(0) 推荐(0)

78. Subsets (Back-Track, DP)

摘要: Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must 阅读全文

posted @ 2015-10-05 06:44 joannae 阅读(257) 评论(0) 推荐(0)

131. Palindrome Partitioning (Back-Track, DP)

摘要: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl 阅读全文

posted @ 2015-10-05 06:39 joannae 阅读(193) 评论(0) 推荐(0)

导航