![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
回溯
unshaven111
这个作者很懒,什么都没留下…
展开
-
39. Combination Sum(一个array中找到和是target的数组,array中的值可以重复)
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.The same repeate...原创 2018-11-06 10:02:07 · 205 阅读 · 0 评论 -
47. Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.Example:Input: [1,1,2]Output:[[1,1,2],[1,2,1],[2,1,1]]class Solution {public: vector&...原创 2018-11-06 14:14:30 · 104 阅读 · 0 评论 -
78. Subsets
Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: nums = [1,2,3]Output:[[3],[1],[2],...原创 2018-11-06 15:00:33 · 95 阅读 · 0 评论 -
90. Subsets II
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Example:Input: [1,2,2]Outp...原创 2018-11-06 16:03:48 · 200 阅读 · 0 评论 -
40. Combination Sum II
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.Each number in candidates may ...原创 2018-11-06 16:20:11 · 74 阅读 · 0 评论 -
131. Palindrome Partitioning
Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.Example:Input: “aab”Output:[[“aa”,“b”],[“a”,“a”,“b”]]...原创 2018-11-06 17:57:43 · 86 阅读 · 0 评论